8 Replies Latest reply on Oct 6, 2010 3:21 AM by kccoyote

    NameNotFoundException going from 6.0 M4 to M5

    kccoyote Newbie

      Our servlet 2.5 app uses jndi lookup for the database. The name in oracle-ds.xml is jndi/database and in the logs upon startup we get the following line:

       

      [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/database' to JNDI name 'java:jdbc/database'

       

      In our web.xml, we have the following:

       

      <resource-ref>

      <res-ref-name>jdbc/database</res-ref-name>

      <res-type>javax.sql.DataSource</res-type>

      <res-auth>Container</res-auth>

      <mapped-name>java:jdbc/database</mapped-name>

      </resource-ref>

       

      When the app starts and tries to lookup jdbc/database, it throws an exception:

       

       

      Caused by: javax.naming.NameNotFoundException: jdbc not bound

      at org.jnp.server.NamingServer.getBinding(NamingServer.java:771) [:5.0.5.Final]

      at org.jnp.server.NamingServer.getBinding(NamingServer.java:779) [:5.0.5.Final]

      at org.jnp.server.NamingServer.getObject(NamingServer.java:785) [:5.0.5.Final]

      at org.jnp.server.NamingServer.lookup(NamingServer.java:396) [:5.0.5.Final]

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:728) [:5.0.5.Final]

      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]

      at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_21]

       

       

      It only does this on M5 - M4 works fine. Both untouched extracted downloads, with the oracle-jdbc driver in server/default/lib and oracle-ds.xml in server/default/deploy.

       

      Any ideas on how to fix this?

        • 1. Re: NameNotFoundException going from 6.0 M4 to M5
          kccoyote Newbie

          The exact string passed to lookup is in both cases: "java:comp/env/jdbc/database".
          With M4, this returns an entry, in M5 it causing the NamingException.
          In M4, the jndiView.list jmx bean returns
          java: Namespace
            +- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)
            +- comp (class: javax.naming.Context)
            +- XAConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- JmsXA (class: org.hornetq.ra.HornetQRAConnectionFactoryImpl)
            +- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration)
            +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
            +- app (class: javax.naming.Context)
          Failed to lookup: app, errmsg=java:app not supported by legacy component null
            +- Mail (class: javax.mail.Session)
            +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
            +- ProfileService (class: org.jboss.profileservice.AbstractProfileService)
            +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
            +- jaas (class: javax.naming.Context)
            |   +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
            |   +- hornetq (class: org.jboss.security.plugins.SecurityDomainContext)
            +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
            +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
            +- ConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
            +- jdbc (class: org.jnp.interfaces.NamingContext)
            |   +- database (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
            +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)
            +- timedCacheFactory (class: javax.naming.Context)
          Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
            +- module (class: javax.naming.Context)
          Failed to lookup: module, errmsg=java:module not supported by legacy component null
            +- internal (class: org.jnp.interfaces.NamingContext)
            |   +- EJBContext (class: javax.ejb.EJBContext)
            |   +- TimerService (class: javax.ejb.TimerService)
            +- global (class: org.jnp.interfaces.NamingContext)
            |   +- jmx-console (class: org.jnp.interfaces.NamingContext)
            |   |   +- ModuleName (class: java.lang.String)
            |   +- scheduler-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ROOT (class: org.jnp.interfaces.NamingContext)
            |   |   +- ModuleName (class: java.lang.String)
            |   +- schedule-manager-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- mail-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- monitoring-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- cache-invalidation-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- database (class: org.jnp.interfaces.NamingContext)
            |   |   +- ModuleName (class: java.lang.String)
            |   +- properties-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- uuid-key-generator (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- transaction-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb2-timer-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- legacy-conf-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- http-invoker (class: org.jnp.interfaces.NamingContext)
            |   |   +- invoker (class: org.jnp.interfaces.NamingContext)
            |   |   |   +- ModuleName (class: java.lang.String)
            |   |   +- AppName (class: java.lang.String)
            |   +- sqlexception-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- legacy-invokers-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jsr88-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
          Global JNDI Namespace
            +- UserTransactionSessionFactory (proxy: $Proxy112 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
            +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
            +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
            +- SecureDeploymentManager (class: org.jnp.interfaces.NamingContext)
            |   +- remote[link -> DeploymentManager] (class: javax.naming.LinkRef)
            +- SecureManagementView (class: org.jnp.interfaces.NamingContext)
            |   +- remote[link -> ManagementView] (class: javax.naming.LinkRef)
            +- DeploymentManager (class: org.jboss.aop.generatedproxies.AOPProxy$4)
            +- XAConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- ProfileService (class: org.jboss.aop.generatedproxies.AOPProxy$2)
            +- SecureProfileService (class: org.jnp.interfaces.NamingContext)
            |   +- remote[link -> ProfileService] (class: javax.naming.LinkRef)
            +- queue (class: org.jnp.interfaces.NamingContext)
            |   +- DLQ (class: org.hornetq.jms.client.HornetQQueue)
            |   +- ExpiryQueue (class: org.hornetq.jms.client.HornetQQueue)
            +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
            +- ConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- jmx (class: org.jnp.interfaces.NamingContext)
            |   +- invoker (class: org.jnp.interfaces.NamingContext)
            |   |   +- RMIAdaptor (class: javax.management.MBeanServerConnection)
            |   +- rmi (class: org.jnp.interfaces.NamingContext)
            |   |   +- RMIAdaptor (class: javax.management.MBeanServerConnection)
            +- BeanValidatorFactories (class: org.jnp.interfaces.NamingContext)
            +- persistence.unit:unitName=#timerdb (class: org.hibernate.impl.SessionFactoryImpl)
            +- TomcatAuthenticators (class: java.util.Properties)
            +- XAThroughputConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- ManagementView (class: org.jboss.aop.generatedproxies.AOPProxy$3)
            +- ThroughputConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
           
           
           
          In M5, the output is
          Other components with java:comp namespace
          java: Namespace
            +- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)
            +- comp (class: javax.naming.Context)
            |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
            |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
            |   +- env (class: org.jnp.interfaces.NamingContext)
            |   |   +- security (class: org.jnp.interfaces.NamingContext)
            |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)
            |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)
            |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)
            |   +- ModuleName (class: java.lang.String)
            +- XAConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- JmsXA (class: org.hornetq.ra.HornetQRAConnectionFactoryImpl)
            +- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration)
            +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
            +- app (class: javax.naming.Context)
            |   +- jmx-console (class: org.jnp.interfaces.NamingContext)
            |   |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
            |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
            |   |   +- env (class: org.jnp.interfaces.NamingContext)
            |   |   |   +- security (class: org.jnp.interfaces.NamingContext)
            |   |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)
            |   |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)
            |   |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)
            |   |   +- ModuleName (class: java.lang.String)
            |   +- AppName (class: java.lang.String)
            +- Mail (class: javax.mail.Session)
            +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)
            +- ProfileService (class: org.jboss.profileservice.AbstractProfileService)
            +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
            +- jaas (class: javax.naming.Context)
            |   +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
            |   +- hornetq (class: org.jboss.security.plugins.SecurityDomainContext)
            +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)
            +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
            +- ConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
            +- jdbc (class: org.jnp.interfaces.NamingContext)
            |   +- database (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
            +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)
            +- timedCacheFactory (class: javax.naming.Context)
          Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration
            +- module (class: javax.naming.Context)
            |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
            |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
            |   +- env (class: org.jnp.interfaces.NamingContext)
            |   |   +- security (class: org.jnp.interfaces.NamingContext)
            |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)
            |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)
            |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)
            |   +- ModuleName (class: java.lang.String)
            +- internal (class: org.jnp.interfaces.NamingContext)
            |   +- EJBContext (class: javax.ejb.EJBContext)
            |   +- TimerService (class: javax.ejb.TimerService)
            +- global (class: org.jnp.interfaces.NamingContext)
            |   +- scheduler-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jmx-console (class: org.jnp.interfaces.NamingContext)
            |   |   +- jmx-console (class: org.jnp.interfaces.NamingContext)
            |   |   |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
            |   |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
            |   |   |   +- env (class: org.jnp.interfaces.NamingContext)
            |   |   |   |   +- security (class: org.jnp.interfaces.NamingContext)
            |   |   |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)
            |   |   |   +- ModuleName (class: java.lang.String)
            |   |   +- AppName (class: java.lang.String)
            |   +- transaction-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- xnio-provider (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- security-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jsr77-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb3-metadata-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jms-ds (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- directory-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- hornetq-jms (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- mod_cluster (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-xa-jdbc (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ROOT (class: org.jnp.interfaces.NamingContext)
            |   |   +- ROOT (class: org.jnp.interfaces.NamingContext)
            |   |   |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
            |   |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
            |   |   |   +- env (class: org.jnp.interfaces.NamingContext)
            |   |   |   |   +- security (class: org.jnp.interfaces.NamingContext)
            |   |   |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)
            |   |   |   +- ModuleName (class: java.lang.String)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-ejb3-timerservice-deployer (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-ejb3-embedded-impl-as (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- hdscanner-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jms-ra (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- shrinkwrap-extension-vdf (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- schedule-manager-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- naming-switchboard-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- mail-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- hornetq-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- security-policies-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- hibernate-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb3-bean-instantiator-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- monitoring-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- admin-console-activator-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- profileservice-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jca-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- cache-invalidation-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb3-connectors-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ear-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb3-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb2-container-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- vfs-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- BeanManagers (class: org.jnp.interfaces.NamingContext)
            |   +- naming-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- quartz-ra (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-logging (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jbossws-console-activator-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- properties-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- hornetq-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- uuid-key-generator (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb2-timer-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- scanning-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb3-interceptors-aop (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-ejb3-metrics-deployer (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- dependency-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- transaction-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- hornetq-configuration (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jmx-console-activator-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-jpa-mcint (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-ejb3-instantiator-deployer (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- http-invoker (class: org.jnp.interfaces.NamingContext)
            |   |   +- invoker (class: org.jnp.interfaces.NamingContext)
            |   |   |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)
            |   |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)
            |   |   |   +- env (class: org.jnp.interfaces.NamingContext)
            |   |   |   |   +- security (class: org.jnp.interfaces.NamingContext)
            |   |   |   |   |   +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- realmMapping[link -> java:/jaas/jmx-console/realmMapping] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)
            |   |   |   |   |   +- authorizationMgr[link -> java:/jaas/jmx-console/authorizationMgr] (class: javax.naming.LinkRef)
            |   |   |   +- ModuleName (class: java.lang.String)
            |   |   +- AppName (class: java.lang.String)
            |   +- jmx-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- legacy-conf-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- singleton-container-aop (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- remoting-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-local-jdbc (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- remoting3-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jbossweb (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- sqlexception-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- thread-pool-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb3-container-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- hsqldb-ds (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- oracle-ds (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-ejb3-async-deployer (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jsr88-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- legacy-invokers-service (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- ejb3-nointerface-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-ejb3-singleton-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- security-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- jboss-ejb3-endpoint-deployer (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- metadata-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
            |   +- mail-ra (class: org.jnp.interfaces.NamingContext)
            |   |   +- AppName (class: java.lang.String)
          Global JNDI Namespace
            +- UserTransactionSessionFactory (proxy: $Proxy97 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)
            +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)
            +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)
            +- SecureDeploymentManager (class: org.jnp.interfaces.NamingContext)
            |   +- remote[link -> DeploymentManager] (class: javax.naming.LinkRef)
            +- SecureManagementView (class: org.jnp.interfaces.NamingContext)
            |   +- remote[link -> ManagementView] (class: javax.naming.LinkRef)
            +- DeploymentManager (class: org.jboss.aop.generatedproxies.AOPProxy$4)
            +- XAConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- ProfileService (class: org.jboss.aop.generatedproxies.AOPProxy$2)
            +- SecureProfileService (class: org.jnp.interfaces.NamingContext)
            |   +- remote[link -> ProfileService] (class: javax.naming.LinkRef)
            +- queue (class: org.jnp.interfaces.NamingContext)
            |   +- DLQ (class: org.hornetq.jms.client.HornetQQueue)
            |   +- ExpiryQueue (class: org.hornetq.jms.client.HornetQQueue)
            +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)
            +- ConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- jmx (class: org.jnp.interfaces.NamingContext)
            |   +- invoker (class: org.jnp.interfaces.NamingContext)
            |   |   +- RMIAdaptor (class: javax.management.MBeanServerConnection)
            |   +- rmi (class: org.jnp.interfaces.NamingContext)
            |   |   +- RMIAdaptor (class: javax.management.MBeanServerConnection)
            +- BeanValidatorFactories (class: org.jnp.interfaces.NamingContext)
            +- TomcatAuthenticators (class: java.util.Properties)
            +- XAThroughputConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)
            +- ManagementView (class: org.jboss.aop.generatedproxies.AOPProxy$3)
            +- ThroughputConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory) 

          The exact string passed to lookup is in both cases: "java:comp/env/jdbc/database".

           

          With M4, this returns an entry, in M5 it causing the NamingException.

           

          In M4, the jndiView.list jmx bean returns

           

          java: Namespace

           

           

            +- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)

            +- comp (class: javax.naming.Context)

            +- XAConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- JmsXA (class: org.hornetq.ra.HornetQRAConnectionFactoryImpl)

            +- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration)

            +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)

            +- app (class: javax.naming.Context)

          Failed to lookup: app, errmsg=java:app not supported by legacy component null

            +- Mail (class: javax.mail.Session)

            +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)

            +- ProfileService (class: org.jboss.profileservice.AbstractProfileService)

            +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)

            +- jaas (class: javax.naming.Context)

            |   +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)

            |   +- hornetq (class: org.jboss.security.plugins.SecurityDomainContext)

            +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)

            +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)

            +- ConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)

            +- jdbc (class: org.jnp.interfaces.NamingContext)

            |   +- database (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)

            +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)

            +- timedCacheFactory (class: javax.naming.Context)

          Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration

            +- module (class: javax.naming.Context)

          Failed to lookup: module, errmsg=java:module not supported by legacy component null

            +- internal (class: org.jnp.interfaces.NamingContext)

            |   +- EJBContext (class: javax.ejb.EJBContext)

            |   +- TimerService (class: javax.ejb.TimerService)

            +- global (class: org.jnp.interfaces.NamingContext)

            |   +- jmx-console (class: org.jnp.interfaces.NamingContext)

            |   |   +- ModuleName (class: java.lang.String)

            |   +- scheduler-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ROOT (class: org.jnp.interfaces.NamingContext)

            |   |   +- ModuleName (class: java.lang.String)

            |   +- schedule-manager-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- mail-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- monitoring-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- cache-invalidation-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- database (class: org.jnp.interfaces.NamingContext)

            |   |   +- ModuleName (class: java.lang.String)

            |   +- properties-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- uuid-key-generator (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- transaction-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb2-timer-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- legacy-conf-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- http-invoker (class: org.jnp.interfaces.NamingContext)

            |   |   +- invoker (class: org.jnp.interfaces.NamingContext)

            |   |   |   +- ModuleName (class: java.lang.String)

            |   |   +- AppName (class: java.lang.String)

            |   +- sqlexception-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- legacy-invokers-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jsr88-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

           

          Global JNDI Namespace

           

           

            +- UserTransactionSessionFactory (proxy: $Proxy112 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)

            +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)

            +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)

            +- SecureDeploymentManager (class: org.jnp.interfaces.NamingContext)

            |   +- remote[link -> DeploymentManager] (class: javax.naming.LinkRef)

            +- SecureManagementView (class: org.jnp.interfaces.NamingContext)

            |   +- remote[link -> ManagementView] (class: javax.naming.LinkRef)

            +- DeploymentManager (class: org.jboss.aop.generatedproxies.AOPProxy$4)

            +- XAConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- ProfileService (class: org.jboss.aop.generatedproxies.AOPProxy$2)

            +- SecureProfileService (class: org.jnp.interfaces.NamingContext)

            |   +- remote[link -> ProfileService] (class: javax.naming.LinkRef)

            +- queue (class: org.jnp.interfaces.NamingContext)

            |   +- DLQ (class: org.hornetq.jms.client.HornetQQueue)

            |   +- ExpiryQueue (class: org.hornetq.jms.client.HornetQQueue)

            +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)

            +- ConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- jmx (class: org.jnp.interfaces.NamingContext)

            |   +- invoker (class: org.jnp.interfaces.NamingContext)

            |   |   +- RMIAdaptor (class: javax.management.MBeanServerConnection)

            |   +- rmi (class: org.jnp.interfaces.NamingContext)

            |   |   +- RMIAdaptor (class: javax.management.MBeanServerConnection)

            +- BeanValidatorFactories (class: org.jnp.interfaces.NamingContext)

            +- persistence.unit:unitName=#timerdb (class: org.hibernate.impl.SessionFactoryImpl)

            +- TomcatAuthenticators (class: java.util.Properties)

            +- XAThroughputConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- ManagementView (class: org.jboss.aop.generatedproxies.AOPProxy$3)

            +- ThroughputConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

           

           

           

          In M5, the output is

           

          Other components with java:comp namespace

           

           

          java: Namespace

           

           

            +- securityManagement (class: org.jboss.security.integration.JNDIBasedSecurityManagement)

            +- comp (class: javax.naming.Context)

            |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)

            |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)

            |   +- env (class: org.jnp.interfaces.NamingContext)

            |   |   +- security (class: org.jnp.interfaces.NamingContext)

            |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)

            |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)

            |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)

            |   +- ModuleName (class: java.lang.String)

            +- XAConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- JmsXA (class: org.hornetq.ra.HornetQRAConnectionFactoryImpl)

            +- policyRegistration (class: org.jboss.security.plugins.JBossPolicyRegistration)

            +- TransactionPropagationContextImporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)

            +- app (class: javax.naming.Context)

            |   +- jmx-console (class: org.jnp.interfaces.NamingContext)

            |   |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)

            |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)

            |   |   +- env (class: org.jnp.interfaces.NamingContext)

            |   |   |   +- security (class: org.jnp.interfaces.NamingContext)

            |   |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)

            |   |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)

            |   |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)

            |   |   +- ModuleName (class: java.lang.String)

            |   +- AppName (class: java.lang.String)

            +- Mail (class: javax.mail.Session)

            +- TransactionPropagationContextExporter (class: com.arjuna.ats.internal.jbossatx.jta.PropagationContextManager)

            +- ProfileService (class: org.jboss.profileservice.AbstractProfileService)

            +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)

            +- jaas (class: javax.naming.Context)

            |   +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)

            |   +- hornetq (class: org.jboss.security.plugins.SecurityDomainContext)

            +- TransactionSynchronizationRegistry (class: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple)

            +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)

            +- ConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)

            +- jdbc (class: org.jnp.interfaces.NamingContext)

            |   +- database (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)

            +- TransactionManager (class: com.arjuna.ats.jbossatx.jta.TransactionManagerDelegate)

            +- timedCacheFactory (class: javax.naming.Context)

          Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy cannot be cast to javax.naming.NamingEnumeration

            +- module (class: javax.naming.Context)

            |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)

            |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)

            |   +- env (class: org.jnp.interfaces.NamingContext)

            |   |   +- security (class: org.jnp.interfaces.NamingContext)

            |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)

            |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)

            |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)

            |   +- ModuleName (class: java.lang.String)

            +- internal (class: org.jnp.interfaces.NamingContext)

            |   +- EJBContext (class: javax.ejb.EJBContext)

            |   +- TimerService (class: javax.ejb.TimerService)

            +- global (class: org.jnp.interfaces.NamingContext)

            |   +- scheduler-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jmx-console (class: org.jnp.interfaces.NamingContext)

            |   |   +- jmx-console (class: org.jnp.interfaces.NamingContext)

            |   |   |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)

            |   |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)

            |   |   |   +- env (class: org.jnp.interfaces.NamingContext)

            |   |   |   |   +- security (class: org.jnp.interfaces.NamingContext)

            |   |   |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)

            |   |   |   +- ModuleName (class: java.lang.String)

            |   |   +- AppName (class: java.lang.String)

            |   +- transaction-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- xnio-provider (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- security-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jsr77-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb3-metadata-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jms-ds (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- directory-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- hornetq-jms (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- mod_cluster (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-xa-jdbc (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ROOT (class: org.jnp.interfaces.NamingContext)

            |   |   +- ROOT (class: org.jnp.interfaces.NamingContext)

            |   |   |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)

            |   |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)

            |   |   |   +- env (class: org.jnp.interfaces.NamingContext)

            |   |   |   |   +- security (class: org.jnp.interfaces.NamingContext)

            |   |   |   |   |   +- securityMgr[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- subject[link -> java:/jaas/jboss-web-policy/subject] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- realmMapping[link -> java:/jaas/jboss-web-policy/realmMapping] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- security-domain[link -> java:/jaas/jboss-web-policy] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- authorizationMgr[link -> java:/jaas/jboss-web-policy/authorizationMgr] (class: javax.naming.LinkRef)

            |   |   |   +- ModuleName (class: java.lang.String)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-ejb3-timerservice-deployer (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-ejb3-embedded-impl-as (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- hdscanner-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jms-ra (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- shrinkwrap-extension-vdf (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- schedule-manager-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- naming-switchboard-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- mail-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- hornetq-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- security-policies-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- hibernate-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb3-bean-instantiator-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- monitoring-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- admin-console-activator-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- profileservice-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jca-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- cache-invalidation-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb3-connectors-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ear-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb3-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb2-container-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- vfs-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- BeanManagers (class: org.jnp.interfaces.NamingContext)

            |   +- naming-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- quartz-ra (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-logging (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jbossws-console-activator-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- properties-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- hornetq-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- uuid-key-generator (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb2-timer-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- scanning-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb3-interceptors-aop (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-ejb3-metrics-deployer (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- dependency-deployers-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- transaction-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- hornetq-configuration (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jmx-console-activator-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-jpa-mcint (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-ejb3-instantiator-deployer (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- http-invoker (class: org.jnp.interfaces.NamingContext)

            |   |   +- invoker (class: org.jnp.interfaces.NamingContext)

            |   |   |   +- UserTransaction[link -> UserTransaction] (class: javax.naming.LinkRef)

            |   |   |   +- TransactionSynchronizationRegistry[link -> java:TransactionSynchronizationRegistry] (class: javax.naming.LinkRef)

            |   |   |   +- env (class: org.jnp.interfaces.NamingContext)

            |   |   |   |   +- security (class: org.jnp.interfaces.NamingContext)

            |   |   |   |   |   +- securityMgr[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- subject[link -> java:/jaas/jmx-console/subject] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- realmMapping[link -> java:/jaas/jmx-console/realmMapping] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- security-domain[link -> java:/jaas/jmx-console] (class: javax.naming.LinkRef)

            |   |   |   |   |   +- authorizationMgr[link -> java:/jaas/jmx-console/authorizationMgr] (class: javax.naming.LinkRef)

            |   |   |   +- ModuleName (class: java.lang.String)

            |   |   +- AppName (class: java.lang.String)

            |   +- jmx-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- legacy-conf-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- singleton-container-aop (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- remoting-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-local-jdbc (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- remoting3-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jbossweb (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- sqlexception-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- thread-pool-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb3-container-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- hsqldb-ds (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- oracle-ds (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-ejb3-async-deployer (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jsr88-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- legacy-invokers-service (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- ejb3-nointerface-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-ejb3-singleton-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- security-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- jboss-ejb3-endpoint-deployer (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- metadata-deployer-jboss-beans (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

            |   +- mail-ra (class: org.jnp.interfaces.NamingContext)

            |   |   +- AppName (class: java.lang.String)

           

          Global JNDI Namespace

           

           

            +- UserTransactionSessionFactory (proxy: $Proxy97 implements interface org.jboss.tm.usertx.interfaces.UserTransactionSessionFactory)

            +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid.UUIDKeyGeneratorFactory)

            +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)

            +- SecureDeploymentManager (class: org.jnp.interfaces.NamingContext)

            |   +- remote[link -> DeploymentManager] (class: javax.naming.LinkRef)

            +- SecureManagementView (class: org.jnp.interfaces.NamingContext)

            |   +- remote[link -> ManagementView] (class: javax.naming.LinkRef)

            +- DeploymentManager (class: org.jboss.aop.generatedproxies.AOPProxy$4)

            +- XAConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- ProfileService (class: org.jboss.aop.generatedproxies.AOPProxy$2)

            +- SecureProfileService (class: org.jnp.interfaces.NamingContext)

            |   +- remote[link -> ProfileService] (class: javax.naming.LinkRef)

            +- queue (class: org.jnp.interfaces.NamingContext)

            |   +- DLQ (class: org.hornetq.jms.client.HornetQQueue)

            |   +- ExpiryQueue (class: org.hornetq.jms.client.HornetQQueue)

            +- UserTransaction (class: org.jboss.tm.usertx.client.ClientUserTransaction)

            +- ConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- jmx (class: org.jnp.interfaces.NamingContext)

            |   +- invoker (class: org.jnp.interfaces.NamingContext)

            |   |   +- RMIAdaptor (class: javax.management.MBeanServerConnection)

            |   +- rmi (class: org.jnp.interfaces.NamingContext)

            |   |   +- RMIAdaptor (class: javax.management.MBeanServerConnection)

            +- BeanValidatorFactories (class: org.jnp.interfaces.NamingContext)

            +- TomcatAuthenticators (class: java.util.Properties)

            +- XAThroughputConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory)

            +- ManagementView (class: org.jboss.aop.generatedproxies.AOPProxy$3)

            +- ThroughputConnectionFactory (class: org.hornetq.jms.client.HornetQConnectionFactory) 

          • 2. Re: NameNotFoundException going from 6.0 M4 to M5
            nimo stephan Master

            Got also a namenotfound-ex in m5 while in m4 no error occurs.

             

            http://community.jboss.org/thread/157055

             

             

            Caused by: javax.naming.NamingException:  Could not dereference object [Root exception is  javax.naming.NamingException: Could not dereference object [Root  exception is javax.naming.NameNotFoundException: MyWAR not bound]]

            • 3. Re: NameNotFoundException going from 6.0 M4 to M5
              kccoyote Newbie

              Some more info - but I can't say it's making it any easier to understand.

               

              The lookup occurs during Spring initialization. When the lookup to java:comp/env/jdbc/database is done, it throws a NamingException.

               

              When I do the lookup after the app is initialized, in a JSP, the same lookup returns the correct object.

               

              So it seems like during initialization, the ENC-JNDI-style lookup (java:comp/env/...) doesn't work anymore, when they used to work in M4...

               

              Do I need to open a ticket or something somewhere? It seems serious enough to warrant this. Currently, I set the <use-java-context>false</use-java-context> in the datasource-definition (this works because the Spring FactoryBean tries to look up both: jdbc/database and java:comp/env/jdbc/database), but I obviously don't want to keep doing this.

               

              Of course, if someone can point me in the right direction or if I make an obvious mistake, please let me know...

              • 4. Re: NameNotFoundException going from 6.0 M4 to M5
                jaikiran pai Master

                It looks like deployment ordering issue. Are you looking it up from some Spring bean or some startup servlet init method? I'm not sure which one it is, because in your first post you mentioned about servlet and in the latest one you say it's a Spring bean.

                • 6. Re: NameNotFoundException going from 6.0 M4 to M5
                  kccoyote Newbie

                  I tried deploying to a running instance: same problem.

                  • 7. Re: NameNotFoundException going from 6.0 M4 to M5
                    jaikiran pai Master

                    I guess, you missed my previous reply asking for some more details http://community.jboss.org/message/564505#564505

                    • 8. Re: NameNotFoundException going from 6.0 M4 to M5
                      kccoyote Newbie

                      The lookup occurs during Spring initialization.

                      I created a jira issue with a sample project: https://jira.jboss.org/browse/JBAS-8496