javax.naming.NameNotFoundException: env not bound

Hibernate JIRA | Bill Pfeiffer | 1 decade ago
  1. 0

    I am attempting to get the Hibernate 2.0 jmx plugin working in JBoss 3.2.1. I built the SAR with a sample javabean (and attendant .hbm.xml file). I specified the jndi name for the datasource to my datasource used in my j2ee ear file and specified by an Oracle-ds.xml in the deploy directory. This datasource is know to work and exist in the jndi name space. The jndi lookup that Hibernate is doing fails to find the datasource at JBoss startup time. I am using the exact text that our J2ee code uses to perform the lookup. I've tried a variety of permutations on this text with no success. It actually appears that it is not accessing the proper jndi namespace. Thanks for any help and I'll post the exception below : 2003-05-07 10:38:39,565 INFO [net.sf.hibernate.util.NamingHelper] JNDI InitialContext properties:{} 2003-05-07 10:38:39,575 FATAL [net.sf.hibernate.connection.DatasourceConnectionProvider] Could not find datasource: java:comp/env/espeed javax.naming.NameNotFoundException: env not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) at org.jnp.server.NamingServer.getObject(NamingServer.java:509) at org.jnp.server.NamingServer.lookup(NamingServer.java:253) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) at javax.naming.InitialContext.lookup(InitialContext.java:347) at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)

    Hibernate JIRA | 1 decade ago | Bill Pfeiffer
    javax.naming.NameNotFoundException: env not bound
  2. 0

    I am attempting to get the Hibernate 2.0 jmx plugin working in JBoss 3.2.1. I built the SAR with a sample javabean (and attendant .hbm.xml file). I specified the jndi name for the datasource to my datasource used in my j2ee ear file and specified by an Oracle-ds.xml in the deploy directory. This datasource is know to work and exist in the jndi name space. The jndi lookup that Hibernate is doing fails to find the datasource at JBoss startup time. I am using the exact text that our J2ee code uses to perform the lookup. I've tried a variety of permutations on this text with no success. It actually appears that it is not accessing the proper jndi namespace. Thanks for any help and I'll post the exception below : 2003-05-07 10:38:39,565 INFO [net.sf.hibernate.util.NamingHelper] JNDI InitialContext properties:{} 2003-05-07 10:38:39,575 FATAL [net.sf.hibernate.connection.DatasourceConnectionProvider] Could not find datasource: java:comp/env/espeed javax.naming.NameNotFoundException: env not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:495) at org.jnp.server.NamingServer.getBinding(NamingServer.java:503) at org.jnp.server.NamingServer.getObject(NamingServer.java:509) at org.jnp.server.NamingServer.lookup(NamingServer.java:253) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471) at javax.naming.InitialContext.lookup(InitialContext.java:347) at net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)

    Hibernate JIRA | 1 decade ago | Bill Pfeiffer
    javax.naming.NameNotFoundException: env not bound
  3. 0

    java:comp/env bound and unbound at the same time

    Oracle Community | 1 decade ago | 843793
    javax.naming.NameNotFoundException: env not bound
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    oracle dataSource creation in JBOSS

    Oracle Community | 1 decade ago | 843854
    javax.naming.NameNotFoundException: env not bound
  6. 0

    Jboss Startup error

    Stack Overflow | 7 years ago | Priyank
    javax.naming.NameNotFoundException: XAConnectionFactory not bound

    6 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.NameNotFoundException

      env not bound

      at org.jnp.server.NamingServer.getBinding()
    2. org.jnp.server
      NamingServer.lookup
      1. org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
      2. org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
      3. org.jnp.server.NamingServer.getObject(NamingServer.java:509)
      4. org.jnp.server.NamingServer.lookup(NamingServer.java:253)
      4 frames
    3. org.jnp.interfaces
      NamingContext.lookup
      1. org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
      2. org.jnp.interfaces.NamingContext.lookup(NamingContext.java:606)
      3. org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      3 frames
    4. Java RT
      InitialContext.lookup
      1. javax.naming.InitialContext.lookup(InitialContext.java:347)
      1 frame
    5. net.sf.hibernate
      DatasourceConnectionProvider.configure
      1. net.sf.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:44)
      1 frame