163 words

Issue deploying J6EE/Eclipse/Glassfish example to TomEE 1.5.1

2012-12-10 22:31

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:


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:


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?

rlserob's picture
Joined on 2012-12-10
User Post #1
2012-12-12 00:12

Obtaining a JTA TransactionManager from TomEE / OpenEJB is non standard, so supporting it requires special treatment.

Please try build 2.4.4_18 that should add this support.

ObjectDB Support
ObjectDB - Fast Object Database for Java (JPA/JDO)
support's picture
Joined on 2010-05-03
User Post #1,369
2012-12-13 21:55

That seemed to do the trick, thanks!

rlserob's picture
Joined on 2012-12-10
User Post #2

Post Reply

Please read carefully the posting instructions - before posting to the ObjectDB website.

  • You may have to disable pop up blocking in order to use the toolbar (e.g. in Chrome).
  • Use ctrl + right click to open the browser context menu in the editing area (e.g. for using a browser spell checker).
  • To insert formatted lines (e.g. Java code, stack trace) - select a style in the toolbar and then insert the text in the new created block.
  • Avoid overflow of published source code examples by breaking long lines.
  • You may mark in paragraph code words (e.g. class names) with the code style (can be applied by ctrl + D).
  • Long stack traces (> 50 lines) and complex source examples (> 100 lines) should be posted as attachments.
Maximum file size: 32 MB