Hi!
I've been trying to get ObjectDB configured with WebSphere Liberty server.
I have been able to get the sample app running in TomCat but when I run the jee version of the guestbook in WebSphere I get a combination of errors depending on how I tweak the configuration the most promising error I get is this one:
Caused by: javax.naming.NamingException: CWNEN1000E: A JNDI operation on a java:comp/env name cannot be completed because the current thread is not associated with a Java Enterprise Edition application component. This condition can occur when the JNDI client using the java:comp/env name does not occur on the thread of a server application request. Make sure that a Java EE application does not run JNDI operations on java:comp/env names within static code blocks or in threads created by that application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on java:comp/env names. [ERROR ] SRVE0315E: An exception occurred: java.lang.Throwable: javax.ejb.EJBException: CWNEN0030E: The server was unable to obtain an object instance for the java:comp/env/guest.GuestDao/em reference. The exception message was: com.objectdb.o._PersistenceException: Failed to use JTA (TransactionManager is not found); nested exception is: java.lang.RuntimeException: com.objectdb.o._PersistenceException: Failed to use JTA (TransactionManager is not found) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4900) at [internal classes] Caused by: javax.ejb.EJBException: CWNEN0030E: The server was unable to obtain an object instance for the java:comp/env/guest.GuestDao/em reference. The exception message was: com.objectdb.o._PersistenceException: Failed to use JTA (TransactionManager is not found); nested exception is: java.lang.RuntimeException: com.objectdb.o._PersistenceException: Failed to use JTA (TransactionManager is not found) at com.ibm.ejs.container.util.ExceptionUtil.EJBException(ExceptionUtil.java:461) at [internal classes] at guest.EJSLocalNSLGuestDao_93abe9c6.getAllGuests(EJSLocalNSLGuestDao_93abe9c6.java) at guest.GuestServlet.doGet(GuestServlet.java:24) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1287) at [internal classes] at com.ibm._jsp._index._jspService(_index.java:93) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:101) ... 1 more Caused by: java.lang.RuntimeException: com.objectdb.o._PersistenceException: Failed to use JTA (TransactionManager is not found) at com.ibm.ws.jpa.management.JPAPUnitInfo.getEntityManagerFactory(JPAPUnitInfo.java:955) ... 10 more Caused by: com.objectdb.o._PersistenceException: Failed to use JTA (TransactionManager is not found) at com.objectdb.o._PersistenceException.b(_PersistenceException.java:45) at com.objectdb.jpa.Provider.createContainerEntityManagerFactory(Provider.java:123) at com.objectdb.jpa.Provider.createContainerEntityManagerFactory(Provider.java:32) at com.ibm.ws.jpa.management.JPAPUnitInfo.createEMFactory(JPAPUnitInfo.java:1070) ... 1 more Caused by: com.objectdb.o.UserException: Failed to use JTA (TransactionManager is not found) at com.objectdb.o.MSG.d(MSG.java:75) at com.objectdb.jpa.EMF.initJta(EMF.java:175) at com.objectdb.jpa.EMF.init(EMF.java:97) at com.objectdb.jpa.Provider.newEMF(Provider.java:136) at com.objectdb.jpa.Provider.createContainerEntityManagerFactory(Provider.java:120) ... 3 more Caused by: javax.naming.NamingException: CWNEN1000E: A JNDI operation on a java:comp/env name cannot be completed because the current thread is not associated with a Java Enterprise Edition application component. This condition can occur when the JNDI client using the java:comp/env name does not occur on the thread of a server application request. Make sure that a Java EE application does not run JNDI operations on java:comp/env names within static code blocks or in threads created by that application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on java:comp/env names. at com.ibm.ws.injectionengine.osgi.internal.naming.InjectionJavaColonHelper.getInjectionScopeData(InjectionJavaColonHelper.java:159) at [internal classes] at javax.naming.InitialContext.lookup(InitialContext.java:417) at com.objectdb.jpa.EMF.initJta(EMF.java:133) ... 6 more
I'm pretty much stuck at this point and am not sure where to go from here. Any pointers anyone could send my way would be helpful.
Thanks!
-Aaron O'Brien
Kansas City, MO