4 Replies Latest reply on Jun 20, 2002 11:37 PM by John Cahill

    JNDI lookup failures - JBoss 2.4.6

    John Cahill Newbie


      I am having trouble accessing the DefaultDS datasource in JBoss using JNDI. I have verified that DefaultDS is bound by looking at JNDI View once the server is up, and when the server boots, it is bound to java:/DefaultDS.

      When I attempt to do a lookup, I repeatedly get a lookup exception "Name not bound".

      I have verified the following:
      1. the provider URL is set to jnp://hostname:1099, (Context.PROVIDER_URL) NOTE: hostname is not my servername, just an example.
      2. the JNDI prefix mappings are set in the initial context properly. (via Context.URL_PKG_PREFIXES
      3. The appropriate client jars are present and in my classpath.
      4. The client code is correct (I code against Weblogic all the time, so I am well acquainted with JNDI).
      5. The context factory is set properly via Context.INITIAL_CONTEXT_FACTORY
      6. I am using the default socket factory.
      7. I am using the JBoss Quick Start Guide as my reference (pages 27 and 28).

      The thing that is throwing me off is the JBoss use of JNDI namespaces. Since DefaultDS is bound to the "java:" namespace, shouldn't the provider URL be java://hostname:1099? Instead of jnp://hostname:1099

      Any help would be appreciated, as the Documentation I bought covers JBoss up to version 2.4.5, and the Quick Start guide I found is for version 3.0. I also consulted the SAMS book, but got no further on this issue.