In order to get past TomEE ignoring objectdb.jar, I tried using the objectdb-jee.jar. It seems to be hardcoded to assume it is being deployed into JBoss AS:
....snip....
Caused by: com.objectdb.o.UserException: Failed to use JTA (TransactionSynchronizationRegistry is not found) at com.objectdb.o.MSG.d(MSG.java:74) at com.objectdb.jpa.EMF.initJtaRegistry(EMF.java:145) at com.objectdb.jpa.EMF.init(EMF.java:89) at com.objectdb.jpa.Provider.newEMF(Provider.java:134) at com.objectdb.jpa.Provider.createContainerEntityManagerFactory(Provider.java:118) ... 21 more Caused by: com.objectdb.o.UserException: Failed to use JTA (TransactionSynchronizationRegistry is not found) at com.objectdb.o.MSG.d(MSG.java:74) at com.objectdb.jpa.EMF.initJtaRegistry(EMF.java:138) ... 24 more Caused by: javax.naming.NameNotFoundException: Name [jboss/TransactionSynchronizationRegistry] is not bound in this Context. Unable to find [jboss]. at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:168) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:158) at javax.naming.InitialContext.lookup(InitialContext.java:411) at com.objectdb.jpa.EMF.initJtaRegistry(EMF.java:129) ... 24 more
If I try it with the objectdb.jar, I end up getting ClassNotFound:
...snip....
Caused by: org.apache.openejb.OpenEJBException: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: com.objectdb.jpa.Provider: java.lang.ClassNotFoundException: com.objectdb.jpa.Provider at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:677) ... 15 more Caused by: org.apache.openejb.OpenEJBRuntimeException: java.lang.ClassNotFoundException: com.objectdb.jpa.Provider at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:104) at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.<init>(ReloadableEntityManagerFactory.java:93) at org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:150) at org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:671) ... 15 more Caused by: java.lang.ClassNotFoundException: com.objectdb.jpa.Provider at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) at org.apache.tomee.catalina.LazyStopWebappClassLoader.loadClass(LazyStopWebappClassLoader.java:86) at org.apache.openejb.assembler.classic.EntityManagerFactoryCallable.call(EntityManagerFactoryCallable.java:47) at org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createDelegate(ReloadableEntityManagerFactory.java:102) ... 18 more
Is there a way to get around this?