I am using Spring 2.0.6 and Hibernate 3.2.x on apache tomcat5.5,now we planed to changed our hybernate mapping files into hybernate+jpa support mapping files. for that we cr
For those who are using Jboss AS, this configuration could be used:
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
Solution extracted from: http://www.gregbugaj.com/?p=172
First of all, you're creating both a Hibernate SessionFactory and a JPA EntityManagerFactory. That does not make very much sense unless you have a very odd setup, and you should very likely throw out the SessionFactory configuration. You can either configure plain vanilla Hibernate, or you can configure JPA, you don't need both.
The creation of the entity manager factory fails because you specified JTA
as the transaction type, but the JTA transaction manager lookup class is not defined. (You defined it in the Hibernate SessionFactory config, but not in your JPA config.)
Add this to your persistence.xml
:
<persistence-unit name="payhub" transaction-type="JTA">
...
<properties>
<property name="hibernate.transaction.manager_lookup_class"
value="com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup"/>
</properties>
</persistence-unit>