jboss7, hibernate 3 entityManagerFactory not found
gebuh Dec 12, 2013 12:04 PMI'm migrating a Seam 2 application to JBoss7.1.1 I have JSF1.2 and Hibernate 3 set in the jboss-deployment-structure.xml but when I get to the point in the deployment where 2nd level caching is initiated I'm getting:
Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: org.jboss.seam.InstantiationException: Could not instantiate Seam component: org.jboss.seam.cache.cacheProvider ... Caused by: java.lang.IllegalArgumentException: EntityManagerFactory not found in JNDI : java:/EntityManagerFactories/MyWar ... Caused by: javax.naming.NameNotFoundException: EntityManagerFactories/MyWar -- service jboss.naming.context.java.EntityManagerFactories.MyWar at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:97) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:178) at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:113) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:214) at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_40] at org.jboss.seam.persistence.ManagedPersistenceContext.getEntityManagerFactoryFromJndiOrValueBinding(ManagedPersistenceContext.java:257) [jboss-seam.jar:2.2.2.Final]
I'm using Hibernate 3.3.1 so my persistence.xml has
<property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider" />
I think this might be related to how ehcache sets up transaction management (it's supposed to happen automagically)
<!-- TransactionManagerLookup configuration ====================================== This class is used by ehcache to lookup the JTA TransactionManager use in the application using an XA enabled ehcache. If no class is specified then DefaultTransactionManagerLookup will find the TransactionManager in the following order *GenericJNDI (i.e. jboss, where the property jndiName controls the name of the TransactionManager object to look up) *Bitronix *Atomikos You can provide you own lookup class that implements the net.sf.ehcache.transaction.manager.TransactionManagerLookup interface. <transactionManagerLookup class="net.sf.ehcache.transaction.manager.DefaultTransactionManagerLookup" properties="jndiName=java:/TransactionManager" propertySeparator=";"/> -->
So I'm letting ehcache configure itself, is there something else I need to do to make this work?
this is eh-cache 2.7.1