tomee with hibernate 3

152 views Asked by At

I am deploying an enterprise app (ear) in tomee as Proof of Concept. Our app was running in jboss 4 before, we are looking for options to migrate to JBoss 7 or tomee.

I am doing a POC with ejb3 and hibernate 3. This is working fine in JBoss 7. When I deploy the same app in tomee, I am getting exceptions while opening hibernate session. Below is the hibernate configuration and exception stack trace. Appreciate any help.

<property name="connection.datasource">java:openejb/Resource/DS</property>

<property name="connection.pool_size">70</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property> 
<property name="current_session_context_class">thread</property> 

<property name="transaction.manager_lookup_class">org.apache.openejb.hibernate.TransactionManagerLookup</property> 
<property name="transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property> 
<property name="hibernate.transaction.flush_before_completion">true</property> 
<property name="hibernate.transaction.auto_close_session">true</property>

</session-factory>

Nov 20, 2014 9:28:37 AM org.apache.openejb.core.transaction.EjbTransactionUtil handleSystemException SEVERE: EjbTransactionUtil.handleSystemException: org.hibernate.SessionFactory.openSession()Lorg/hibernate/Session; java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/Session;

1

There are 1 answers

0
Venu On

When I started server next day to look into the issue, it was complaining about missing antlr jar file. I added antlr jar file to tomee lib folder, then Hibernate configuration is working without any issues.

I am not sure why it wasn't showing missing antlr exception before, It was throwing above posted exception.