I've just started using hibernate annotations for my POJO mappings in my Sping+Hibernate based project (JDK 1.6.0_23) and I'm getting this error regarding incompatibility between classes. The sessionFactory is configured as:
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="configLocation" value="classpath:hibernate.cfg.xml"/>
<property name="configurationClass" value="org.hibernate.cfg.AnnotationConfiguration" />
<property name="namingStrategy">
<bean class="org.hibernate.cfg.ImprovedNamingStrategy" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.format_sql">no</prop>
<prop key="hibernate.connection.isolation">3</prop>
<prop key="hibernate.transaction.factory_class">com.atomikos.icatch.jta.hibernate3.AtomikosJTATransactionFactory </prop>
<prop key="hibernate.transaction.manager_lookup_class">com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup</prop>
</props>
</property>
</bean>
In my Maven project file I've set the following dependencies: javax.persistence persistence-api 1.0 jar false org.hibernate hibernate-annotations ${hibernate.version} jar false org.hibernate hibernate-core ${hibernate.version} jar false org.hibernate hibernate-ehcache ${hibernate.version} jar false 2.5.5 3.5.6-Final 0.5
Could anyone give me a hint as to how to solve the problem? Thank you
Peter