Hello Marco,

By default, OpenEJB is bundled with OpenJPA persistence provider.
If you want to use Hibernate, you need to exclude OpenJPA from openejb/lib
directory and add all Hibernate stuff.

Regarding the transaction manager lookup, you don't need to set it cause
OpenEJB will do it for you if the persistence provider is Hibernate.

Anyway, can you give us some more details?

Regards,
JLouis



mdebooy wrote:
> 
> I have tried to find the solution for my problem on this forum and the web
> but I could not find it.
> 
> I have the following error message:
> org/hibernate/transaction/TransactionManagerLookup
> org.apache.openejb.OpenEJBException: Creating application failed:
> D:\Program Files\Apache Software
> Foundation\apache-tomcat-5.5.28\webapps\web-0.1.0-SNAPSHOT:
> org/hibernate/transaction/TransactionManagerLookup
> 
> My persistence.xml looks like:
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";>
>   <persistence-unit name="perUnit" transaction-type="JTA">
>     <provider>org.hibernate.ejb.HibernatePersistence</provider>
>     <jta-data-source>PERUNIT</jta-data-source>
>     <non-jta-data-source>PERUNITNonJta</non-jta-data-source>
>     <class>my.class</class>
> 
>     <properties>
>       <property name="hibernate.dialect"
> value="org.hibernate.dialect.MySQLDialect" />
>       <property name="hibernate.transaction.manager_lookup_class"
> value="org.apache.openejb.hibernate.TransactionManagerLookup" />
>       <property name="openjpa.Log" value="log4j" />
>       <property name="show_sql" value="true" />
>       <property name="transaction.factory_class"
> value="org.hibernate.transaction.JTATransactionFactory" />
>     </properties>
>   </persistence-unit>
> </persistence>
> 
> Why is openejb not using
> org.apache.openejb.hibernate.TransactionManagerLookup?
> 
> I use:
> tomcat 5.5.28
> openejb 3.1.2
> hibernate 3.3.2.GA
> 
> Regards,
> 
> Marco
> 

-- 
View this message in context: 
http://openejb.979440.n4.nabble.com/persistence-tp2285460p2285763.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to