javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]

JBoss Issue Tracker | Jacques Desmazières | 9 years ago
  1. 0

    When configuraing jBPM / Hibernate with a datasource in an Enterprise application, using a local JNDI reference (java:comp/env/...) the web application works properly, accessing the database without any problem. But if you declare the JobExecutorServlet in the web application's web.xml, each time the this servlet JobExecutorThread fires, it generates exceptions: [22/08/07 18:33:03:175 CEST] 0000005e SystemOut O 18:33:03 DEBUG org.jbpm.job.executor.JobExecutorThread : acquiring jobs for execution... [22/08/07 18:33:03:315 CEST] 0000005f javaURLContex E NMSV0310E: Une opération JNDI sur un nom "java:" ne peut pas aboutir car le contexte d'exécution du serveur ne peut pas associer l'unité d'exécution de l'opération à un composant d'application J2EE. Cette condition peut se produire lorsque le client JNDI utilisant le nom "java:" n'est pas exécuté sur l'unité d'exécution d'une demande d'application du serveur. Assurez-vous qu'une application J2EE n'exécute pas d'opérations JNDI sur des noms "java:" dans des blocs de code statiques ou dans des unités d'exécution créées par cette application J2EE. Un code de ce type ne s'exécute pas nécessairement sur l'unité d'exécution d'une demande d'application du serveur et n'est donc pas pris en charge par les opérations JNDI sur les noms "java:". Trace de pile d'exceptions : javax.naming.ConfigurationException [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".] at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:411) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144) at javax.naming.InitialContext.lookup(InitialContext.java:363) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91) at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98) at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354) at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563) at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109) at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56) Caused by: javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384) ... 17 more [22/08/07 18:33:03:347 CEST] 0000005e SystemOut O 18:33:03 FATAL org.hibernate.connection.DatasourceConnectionProvider : Could not find datasource: java:comp/env/jdbc/dsJBPM javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".] at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:416) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144) at javax.naming.InitialContext.lookup(InitialContext.java:363) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91) at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98) at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354) at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563) at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109) at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56) Caused by: javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384) ... 17 more [22/08/07 18:33:03:347 CEST] 0000005e SystemOut O 18:33:03 ERROR org.jbpm.job.executor.JobExecutorThread : exception in job executor thread. waiting 10000 milliseconds org.hibernate.HibernateException: Could not find datasource at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91) at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98) at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354) at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563) at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109) at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56) Caused by: javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".] at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:416) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144) at javax.naming.InitialContext.lookup(InitialContext.java:363) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) ... 13 more Caused by: javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384) ... 17 more The exception is raised even if there is no timer in the process definition. If I replace the local JNDI reference (java:comp/env/jdbc/datasource) with the global JNDI name (jdbc/dsOracle) the JobExecutorThread works fine (even if Websphere logs warning due to direct use of the global JNDI reference). The JobExecutorThread also works if I replace the datasource with the database access parameters (driver, url, ...). (sample ear is available to reproduce the bug if necessary)

    JBoss Issue Tracker | 9 years ago | Jacques Desmazières
    javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]
  2. 0

    When configuraing jBPM / Hibernate with a datasource in an Enterprise application, using a local JNDI reference (java:comp/env/...) the web application works properly, accessing the database without any problem. But if you declare the JobExecutorServlet in the web application's web.xml, each time the this servlet JobExecutorThread fires, it generates exceptions: [22/08/07 18:33:03:175 CEST] 0000005e SystemOut O 18:33:03 DEBUG org.jbpm.job.executor.JobExecutorThread : acquiring jobs for execution... [22/08/07 18:33:03:315 CEST] 0000005f javaURLContex E NMSV0310E: Une opération JNDI sur un nom "java:" ne peut pas aboutir car le contexte d'exécution du serveur ne peut pas associer l'unité d'exécution de l'opération à un composant d'application J2EE. Cette condition peut se produire lorsque le client JNDI utilisant le nom "java:" n'est pas exécuté sur l'unité d'exécution d'une demande d'application du serveur. Assurez-vous qu'une application J2EE n'exécute pas d'opérations JNDI sur des noms "java:" dans des blocs de code statiques ou dans des unités d'exécution créées par cette application J2EE. Un code de ce type ne s'exécute pas nécessairement sur l'unité d'exécution d'une demande d'application du serveur et n'est donc pas pris en charge par les opérations JNDI sur les noms "java:". Trace de pile d'exceptions : javax.naming.ConfigurationException [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".] at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:411) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144) at javax.naming.InitialContext.lookup(InitialContext.java:363) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91) at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98) at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354) at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563) at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109) at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56) Caused by: javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384) ... 17 more [22/08/07 18:33:03:347 CEST] 0000005e SystemOut O 18:33:03 FATAL org.hibernate.connection.DatasourceConnectionProvider : Could not find datasource: java:comp/env/jdbc/dsJBPM javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".] at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:416) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144) at javax.naming.InitialContext.lookup(InitialContext.java:363) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91) at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98) at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354) at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563) at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109) at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56) Caused by: javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384) ... 17 more [22/08/07 18:33:03:347 CEST] 0000005e SystemOut O 18:33:03 ERROR org.jbpm.job.executor.JobExecutorThread : exception in job executor thread. waiting 10000 milliseconds org.hibernate.HibernateException: Could not find datasource at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124) at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56) at org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91) at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94) at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98) at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354) at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563) at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109) at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56) Caused by: javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".] at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:416) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204) at com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144) at javax.naming.InitialContext.lookup(InitialContext.java:363) at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52) ... 13 more Caused by: javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:". at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1767) at com.ibm.ws.naming.ipbase.NameSpace.lookupInternal(NameSpace.java:1083) at com.ibm.ws.naming.ipbase.NameSpace.lookup(NameSpace.java:991) at com.ibm.ws.naming.urlbase.UrlContextImpl.lookup(UrlContextImpl.java:1263) at com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:384) ... 17 more The exception is raised even if there is no timer in the process definition. If I replace the local JNDI reference (java:comp/env/jdbc/datasource) with the global JNDI name (jdbc/dsOracle) the JobExecutorThread works fine (even if Websphere logs warning due to direct use of the global JNDI reference). The JobExecutorThread also works if I replace the datasource with the database access parameters (driver, url, ...). (sample ear is available to reproduce the bug if necessary)

    JBoss Issue Tracker | 9 years ago | Jacques Desmazières
    javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]
  3. 0

    Websphere JNDI lookup fails

    Stack Overflow | 3 years ago | sab
    javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name not found in context "java:".]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Websphere JNDI lookup fails

    programask.com | 1 year ago
    javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name not found in context "java:".]
  6. 0

    Exception While executing findUsers() API

    Oracle Community | 7 years ago | Suren.Khatana
    javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".]

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. javax.naming.ConfigurationException

      A JNDI operation on a "java:" name cannot be completed because the serverruntime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE 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:" names. [Root exception is javax.naming.NameNotFoundException: Name comp/env/jdbc not found in context "java:".]

      at com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS()
    2. WebSphere
      javaURLContextRoot.lookup
      1. com.ibm.ws.naming.java.javaURLContextImpl.throwConfigurationExceptionWithDefaultJavaNS(javaURLContextImpl.java:416)
      2. com.ibm.ws.naming.java.javaURLContextImpl.lookup(javaURLContextImpl.java:388)
      3. com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:204)
      4. com.ibm.ws.naming.java.javaURLContextRoot.lookup(javaURLContextRoot.java:144)
      4 frames
    3. Java RT
      InitialContext.lookup
      1. javax.naming.InitialContext.lookup(InitialContext.java:363)
      1 frame
    4. Hibernate
      ConnectionProviderFactory.newConnectionProvider
      1. org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
      2. org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
      3. org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:56)
      3 frames
    5. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.cfg.SettingsFactory.createConnectionProvider(SettingsFactory.java:410)
      2. org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
      3. org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
      4. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
      4 frames
    6. org.jbpm.persistence
      DbPersistenceService.getJobSession
      1. org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
      2. org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
      3. org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98)
      4. org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:354)
      4 frames
    7. org.jbpm
      JbpmContext.getJobSession
      1. org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
      1 frame
    8. org.jbpm.job
      JobExecutorThread.run
      1. org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109)
      2. org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
      2 frames