javax.naming.NameNotFoundException

tip

Add localDataSource="true" to the realm when using local database.

tip

Make sure you use the same name for your database everywhere in context.xml.

tip

Try removing the server.xml file and adding it again to the project, and do a Clean Build.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • I am seeing a ton of the following errors 2012-09-13 14:10:00,103 localhost-startStop-1 WARN [core.entity.transaction.JNDIFactory] NamingException while finding UserTransaction name d java:comp/env/UserTransaction in JNDI. javax.naming.NameNotFoundException: Name [UserTransaction] is not bound in this Context. Unable to find [UserTransaction]. at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) ------------------ # less /opt/tomcat/jira/conf/Catalina/localhost/jira.xml <!-- A sample configuration file for Tomcat 4.1.x and 5.0 Customize the docBase attribute, drop in your $CATALINA_HOME/webapps/ (4.1.x) or $CATALINA_HOME/conf/Catalina/localhost/ (5.0) directory and restart Tomcat. Note the JOTM dependencies; you'll need to copy various jars to Tomcat's common/lib/ directory. See http://www.atlassian.com/software/jira/docs/latest/servers/tomcat41.html for details. --> <Context path="/jira" docBase="webapps/atlassian-jira-5.1.4.war" debug="0" useHttpOnly="true"> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"/> <ResourceParams name="UserTransaction"> <parameter> <name>factory</name> <value>org.objectweb.jotm.UserTransactionFactory</value> </parameter> <parameter> <name>jotm.timeout</name> <value>60</value> </parameter> </ResourceParams> </Context> ------------------- snippet for entityengine.xml <!-- TRANSACTION FACTORY - This configures how JIRA finds the application server's transaction management. The default ('java:comp/env/UserTransaction') is correct for Tomcat 5.5. For details on configuring for other application servers - see: http://www.atlassian.com/software/jira/docs/latest/entityengine.html#transactionfactory --> <transaction-factory class="org.ofbiz.core.entity.transaction.JNDIFactory"> <user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/> <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/> </transaction-factory>
    via by JB,
  • the context path is actual set to /jira - I wolould like to set it to /jira-test but the system does not get up. the context path is only set in the server.xml: <Context path="/jira-test" docBase="/var/apphome/jira/catalina_base/webapps/jira/"> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> <Manager pathname=""/> </Context> When I set the context path back to /jira it will work again. Tomcat 7.0.41 Java 1.7.0_25 Linux 2.6.32-358.11.1.el6.x86_64 Oracle JDBC driver 11.2.0.3.0 Jira Version 6.0.5 Jira Build Number 6102 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:oracle:thin:@XXXXXXX/aenjira6_e.XXXXXXXXX', driverClassName='oracle.jdbc.OracleDriver', username='AENJIRA6', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=20, minSize=20, initialSize=null, maxIdle=20, maxWait=30000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery=null, minEvictableTimeMillis=null, timeBetweenEvictionRunsMillis=null, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=null, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=300, validationQueryTimeout=null, defaultCatalog=null}} java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource .... 2013-11-04 13:42:49,301 localhost-startStop-1 WARN [core.entity.transaction.JNDIFactory] NamingException while finding UserTransaction named java:comp/env/UserTransaction in JNDI. javax.naming.NameNotFoundException: Name [UserTransaction] is not bound in this Context. Unable to find [UserTransaction]. at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) at org.apache.naming.NamingContext.lookup ...
    via by Michael,
  • I am seeing a ton of the following errors 2012-09-13 14:10:00,103 localhost-startStop-1 WARN [core.entity.transaction.JNDIFactory] NamingException while finding UserTransaction name d java:comp/env/UserTransaction in JNDI. javax.naming.NameNotFoundException: Name [UserTransaction] is not bound in this Context. Unable to find [UserTransaction]. at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) ------------------ # less /opt/tomcat/jira/conf/Catalina/localhost/jira.xml <!-- A sample configuration file for Tomcat 4.1.x and 5.0 Customize the docBase attribute, drop in your $CATALINA_HOME/webapps/ (4.1.x) or $CATALINA_HOME/conf/Catalina/localhost/ (5.0) directory and restart Tomcat. Note the JOTM dependencies; you'll need to copy various jars to Tomcat's common/lib/ directory. See http://www.atlassian.com/software/jira/docs/latest/servers/tomcat41.html for details. --> <Context path="/jira" docBase="webapps/atlassian-jira-5.1.4.war" debug="0" useHttpOnly="true"> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"/> <ResourceParams name="UserTransaction"> <parameter> <name>factory</name> <value>org.objectweb.jotm.UserTransactionFactory</value> </parameter> <parameter> <name>jotm.timeout</name> <value>60</value> </parameter> </ResourceParams> </Context> ------------------- snippet for entityengine.xml <!-- TRANSACTION FACTORY - This configures how JIRA finds the application server's transaction management. The default ('java:comp/env/UserTransaction') is correct for Tomcat 5.5. For details on configuring for other application servers - see: http://www.atlassian.com/software/jira/docs/latest/entityengine.html#transactionfactory --> <transaction-factory class="org.ofbiz.core.entity.transaction.JNDIFactory"> <user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/> <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/> </transaction-factory>
    via by JB,
  • the context path is actual set to /jira - I wolould like to set it to /jira-test but the system does not get up. the context path is only set in the server.xml: <Context path="/jira-test" docBase="/var/apphome/jira/catalina_base/webapps/jira/"> <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> <Manager pathname=""/> </Context> When I set the context path back to /jira it will work again. Tomcat 7.0.41 Java 1.7.0_25 Linux 2.6.32-358.11.1.el6.x86_64 Oracle JDBC driver 11.2.0.3.0 Jira Version 6.0.5 Jira Build Number 6102 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:oracle:thin:@XXXXXXX/aenjira6_e.XXXXXXXXX', driverClassName='oracle.jdbc.OracleDriver', username='AENJIRA6', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=20, minSize=20, initialSize=null, maxIdle=20, maxWait=30000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery=null, minEvictableTimeMillis=null, timeBetweenEvictionRunsMillis=null, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=null, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=300, validationQueryTimeout=null, defaultCatalog=null}} java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource .... 2013-11-04 13:42:49,301 localhost-startStop-1 WARN [core.entity.transaction.JNDIFactory] NamingException while finding UserTransaction named java:comp/env/UserTransaction in JNDI. javax.naming.NameNotFoundException: Name [UserTransaction] is not bound in this Context. Unable to find [UserTransaction]. at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) at org.apache.naming.NamingContext.lookup ...
    via by Michael,
  • I'm using CDI to build my EntityManager. When building it, Hibernate doesn't manage to retrieve my DataSource using JNDI. It's not a problem of my {{persistence.xml}} or {{context.xml}} because when my EntityManager is built sooner (in a {{@WebListener > .contextInitialized(ServletContextEvent)}}), the DataSource is correctly found using the same JNDI address. I debugged the application and saw that {{new javax.naming.InitialContext().lookup("java:/comp/env/jdbc/myproject")}} was correctly returning the DataSource until {{Thread.currentThread().setContextClassLoader( aggregatedClassLoader )}} in : {code:java|title=org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.java} public <T> T withTccl(Work<T> work) { final ClassLoader tccl = Thread.currentThread().getContextClassLoader(); boolean set = false; try { Thread.currentThread().setContextClassLoader( aggregatedClassLoader ); set = true; } catch (Exception ignore) { } try { return work.perform(); } finally { if ( set ) { Thread.currentThread().setContextClassLoader( tccl ); } } } {code} After the execution of that line, {{new javax.naming.InitialContext().lookup("java:/comp/env/jdbc/myproject")}} throws {{javax.naming.NameNotFoundException: Name java:/comp/env/jdbc/myproject is not bound in this Context}}. Here is the complete stack : {noformat} javax.persistence.PersistenceException: Unable to build entity manager factory at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:83) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39) at com.mycompany.myproject.data.EntityManagerFactoryProducer.createEntityManagerFactory(EntityManagerFactoryProducer.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83) at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96) at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151) at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183) at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99) at org.jboss.weld.proxies.EntityManagerFactory$1746355237$Proxy$_$$_WeldClientProxy.createEntityManager(Unknown Source) at com.mycompany.myproject.data.EntityManagerFactoryProducer.createEntityManager(EntityManagerFactoryProducer.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83) at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96) at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151) at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183) at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99) at org.jboss.weld.proxies.EntityManager$1746355238$Proxy$_$$_WeldClientProxy.getTransaction(Unknown Source) at com.mycompany.myframework.transaction.TransactionalInterceptor.interceptTransactional(TransactionalInterceptor.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74) at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNext(AbstractInterceptionChain.java:116) at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNextInterceptor(AbstractInterceptionChain.java:94) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:43) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:36) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:51) at com.mycompany.myproject.service.ProfileService$Proxy$_$$_WeldSubclass.findAll(Unknown Source) at com.mycompany.myproject.service.ProfileService$Proxy$_$$_WeldClientProxy.findAll(Unknown Source) at com.mycompany.myproject.ws.administration.UserSearchWS.init(UserSearchWS.java:56) at com.mycompany.myproject.ws.administration.UserSearchWS$Proxy$_$$_WeldClientProxy.init(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:288) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:242) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:229) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:/comp/env/jdbc/myproject] at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117) at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:115) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75) ... 79 more Caused by: javax.naming.NameNotFoundException: Name java:/comp/env/jdbc/myproject is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) at javax.naming.InitialContext.lookup(InitialContext.java:415) at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) ... 95 more {noformat} Here are the classes : {code:java|title=com.mycompany.myproject.ws.administration.UserSearchWS.java} @Path("/administration/userSearch") @ApplicationScoped public class UserSearchWS { @Inject private ProfileService profileService; @GET @Path("/init") public StreamingOutput init() { final List<Profile> profileList = profileService.findAll(); ... {code} {code:java|title=com.mycompany.myproject.service.ProfileService.java} @Transactional @ApplicationScoped public class ProfileService extends JPAEntityService<Profile, Integer> { @Inject private Instance<EntityManager> entityManagerInstance; public List<Profile> findAll() { return entityManagerInstance.get().createQuery("from Profile").getResultList(); } } {code} {code:java|title=com.mycompany.myframework.transaction.TransactionalInterceptor.java} @Interceptor @Transactional public class TransactionalInterceptor { @Inject Instance<EntityManager> entityManagerInstance; @AroundInvoke public Object interceptTransactional(final InvocationContext invocationContext) throws Exception { EntityManager entityManager = null; EntityTransaction transaction = null; try { entityManager = entityManagerInstance.get(); transaction = entityManager.getTransaction(); } catch (final ContextException e) { ... {code} {code:java|title=com.mycompany.myproject.data.EntityManagerFactoryProducer.java} @ApplicationScoped public class EntityManagerFactoryProducer { @Produces @ApplicationScoped public EntityManagerFactory createEntityManagerFactory() { return Persistence.createEntityManagerFactory("com.mycompany.myproject"); } @Produces @RequestScoped public EntityManager createEntityManager(final EntityManagerFactory entityManagerFactory) { return entityManagerFactory.createEntityManager(); } ... // @Disposes code {code} {code:xml|title=persistence.xml} ... <persistence-unit name="com.mycompany.myproject" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <non-jta-data-source>java:/comp/env/jdbc/myproject</non-jta-data-source> ... {code} And when I use that {{DataInitializer}}, I'm getting no problem, the previous code passes because the {{EntityManagerFactory}} is correctly initialized : {code:java|title=com.mycompany.myproject.bootstrap.DataInitializer.java} @WebListener public class DataInitializer implements ServletContextListener { @Override public void contextInitialized(final ServletContextEvent sce) { try { final Context ctx = new InitialContext(); final BeanManager beanManager = (BeanManager) ctx.lookup("java:comp/env/BeanManager"); final Bean<EntityManagerFactory> bean = (Bean<EntityManagerFactory>) beanManager.resolve(beanManager.getBeans(EntityManagerFactory.class)); final EntityManagerFactory entityManagerFactory = beanManager.getContext(bean.getScope()).get(bean, beanManager.createCreationalContext(bean)); final EntityManager entityManager = entityManagerFactory.createEntityManager(); } catch (final NamingException e) { throw new IllegalStateException("Problem while initializing", e); } } ... {code} In that case, here is the stack when correctly creating my {{EntityManagerFactory}} & {{EntityManager}} : {noformat} at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:115) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39) at com.mycompany.myproject.data.EntityManagerFactoryProducer.createEntityManagerFactory(EntityManagerFactoryProducer.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83) at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96) at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151) at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183) at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) at com.mycompany.myproject.bootstrap.DataInitializer.createSampleDatas(DataInitializer.java:29) at com.mycompany.myproject.bootstrap.DataInitializer.contextInitialized(DataInitializer.java:66) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) {noformat} I've tested with latest Tomcat (7.0.53) and still have the same behaviors.
    via by Anthony Ogier,
  • I'm using CDI to build my EntityManager. When building it, Hibernate doesn't manage to retrieve my DataSource using JNDI. It's not a problem of my {{persistence.xml}} or {{context.xml}} because when my EntityManager is built sooner (in a {{@WebListener > .contextInitialized(ServletContextEvent)}}), the DataSource is correctly found using the same JNDI address. I debugged the application and saw that {{new javax.naming.InitialContext().lookup("java:/comp/env/jdbc/myproject")}} was correctly returning the DataSource until {{Thread.currentThread().setContextClassLoader( aggregatedClassLoader )}} in : {code:java|title=org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.java} public <T> T withTccl(Work<T> work) { final ClassLoader tccl = Thread.currentThread().getContextClassLoader(); boolean set = false; try { Thread.currentThread().setContextClassLoader( aggregatedClassLoader ); set = true; } catch (Exception ignore) { } try { return work.perform(); } finally { if ( set ) { Thread.currentThread().setContextClassLoader( tccl ); } } } {code} After the execution of that line, {{new javax.naming.InitialContext().lookup("java:/comp/env/jdbc/myproject")}} throws {{javax.naming.NameNotFoundException: Name java:/comp/env/jdbc/myproject is not bound in this Context}}. Here is the complete stack : {noformat} javax.persistence.PersistenceException: Unable to build entity manager factory at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:83) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39) at com.mycompany.myproject.data.EntityManagerFactoryProducer.createEntityManagerFactory(EntityManagerFactoryProducer.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83) at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96) at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151) at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183) at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99) at org.jboss.weld.proxies.EntityManagerFactory$1746355237$Proxy$_$$_WeldClientProxy.createEntityManager(Unknown Source) at com.mycompany.myproject.data.EntityManagerFactoryProducer.createEntityManager(EntityManagerFactoryProducer.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83) at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96) at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151) at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183) at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98) at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99) at org.jboss.weld.proxies.EntityManager$1746355238$Proxy$_$$_WeldClientProxy.getTransaction(Unknown Source) at com.mycompany.myframework.transaction.TransactionalInterceptor.interceptTransactional(TransactionalInterceptor.java:47) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74) at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNext(AbstractInterceptionChain.java:116) at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNextInterceptor(AbstractInterceptionChain.java:94) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:43) at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:36) at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:51) at com.mycompany.myproject.service.ProfileService$Proxy$_$$_WeldSubclass.findAll(Unknown Source) at com.mycompany.myproject.service.ProfileService$Proxy$_$$_WeldClientProxy.findAll(Unknown Source) at com.mycompany.myproject.ws.administration.UserSearchWS.init(UserSearchWS.java:56) at com.mycompany.myproject.ws.administration.UserSearchWS$Proxy$_$$_WeldClientProxy.init(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:288) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:242) at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:229) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:/comp/env/jdbc/myproject] at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117) at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:115) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75) ... 79 more Caused by: javax.naming.NameNotFoundException: Name java:/comp/env/jdbc/myproject is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:154) at javax.naming.InitialContext.lookup(InitialContext.java:415) at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) ... 95 more {noformat} Here are the classes : {code:java|title=com.mycompany.myproject.ws.administration.UserSearchWS.java} @Path("/administration/userSearch") @ApplicationScoped public class UserSearchWS { @Inject private ProfileService profileService; @GET @Path("/init") public StreamingOutput init() { final List<Profile> profileList = profileService.findAll(); ... {code} {code:java|title=com.mycompany.myproject.service.ProfileService.java} @Transactional @ApplicationScoped public class ProfileService extends JPAEntityService<Profile, Integer> { @Inject private Instance<EntityManager> entityManagerInstance; public List<Profile> findAll() { return entityManagerInstance.get().createQuery("from Profile").getResultList(); } } {code} {code:java|title=com.mycompany.myframework.transaction.TransactionalInterceptor.java} @Interceptor @Transactional public class TransactionalInterceptor { @Inject Instance<EntityManager> entityManagerInstance; @AroundInvoke public Object interceptTransactional(final InvocationContext invocationContext) throws Exception { EntityManager entityManager = null; EntityTransaction transaction = null; try { entityManager = entityManagerInstance.get(); transaction = entityManager.getTransaction(); } catch (final ContextException e) { ... {code} {code:java|title=com.mycompany.myproject.data.EntityManagerFactoryProducer.java} @ApplicationScoped public class EntityManagerFactoryProducer { @Produces @ApplicationScoped public EntityManagerFactory createEntityManagerFactory() { return Persistence.createEntityManagerFactory("com.mycompany.myproject"); } @Produces @RequestScoped public EntityManager createEntityManager(final EntityManagerFactory entityManagerFactory) { return entityManagerFactory.createEntityManager(); } ... // @Disposes code {code} {code:xml|title=persistence.xml} ... <persistence-unit name="com.mycompany.myproject" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <non-jta-data-source>java:/comp/env/jdbc/myproject</non-jta-data-source> ... {code} And when I use that {{DataInitializer}}, I'm getting no problem, the previous code passes because the {{EntityManagerFactory}} is correctly initialized : {code:java|title=com.mycompany.myproject.bootstrap.DataInitializer.java} @WebListener public class DataInitializer implements ServletContextListener { @Override public void contextInitialized(final ServletContextEvent sce) { try { final Context ctx = new InitialContext(); final BeanManager beanManager = (BeanManager) ctx.lookup("java:comp/env/BeanManager"); final Bean<EntityManagerFactory> bean = (Bean<EntityManagerFactory>) beanManager.resolve(beanManager.getBeans(EntityManagerFactory.class)); final EntityManagerFactory entityManagerFactory = beanManager.getContext(bean.getScope()).get(bean, beanManager.createCreationalContext(bean)); final EntityManager entityManager = entityManagerFactory.createEntityManager(); } catch (final NamingException e) { throw new IllegalStateException("Problem while initializing", e); } } ... {code} In that case, here is the stack when correctly creating my {{EntityManagerFactory}} & {{EntityManager}} : {noformat} at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114) at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:115) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260) at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206) at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75) at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39) at com.mycompany.myproject.data.EntityManagerFactoryProducer.createEntityManagerFactory(EntityManagerFactoryProducer.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90) at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83) at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96) at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151) at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183) at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96) at com.mycompany.myproject.bootstrap.DataInitializer.createSampleDatas(DataInitializer.java:29) at com.mycompany.myproject.bootstrap.DataInitializer.contextInitialized(DataInitializer.java:66) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) {noformat} I've tested with latest Tomcat (7.0.53) and still have the same behaviors.
    via by Anthony Ogier,
    • javax.naming.NameNotFoundException: Name [UserTransaction] is not bound in this Context. Unable to find [UserTransaction]. at org.apache.naming.NamingContext.lookup(NamingContext.java:820) at org.apache.naming.NamingContext.lookup(NamingContext.java:154)

    Users with the same issue

    CasperCasper
    6 times, last one,
    rafaelrafael
    1 times, last one,
    treefolktreefolk
    1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    davidvanlaatumdavidvanlaatum
    1 times, last one,
    29 more bugmates