2 Replies Latest reply on Jun 20, 2003 3:16 PM by rharris1

    Not Bound: Strange JNDI Data Source Error

    rharris1

      I am getting a "javax.naming.NameNotFoundException: SapdbDS not bound" for a data source that according to both the jmx-console and the server log is bound to java:/SapdbDS.

      The sapdb-ds.xml looks like:



      <local-tx-datasource>

      <jndi-name>SapdbDS</jndi-name>

      <connection-url>jdbc:sapdb://london/CWM</connection-url>

      <driver-class>com.sap.dbtech.jdbc.DriverSapDB</driver-class>

      <user-name>CWM</user-name>

      CWM

      </local-tx-datasource>







      -----------------------------------------------------------

      The client context is obtained via:

      private static Context getInitialContext() throws NamingException {
      Hashtable env = new Hashtable();
      env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
      env.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");

      return new InitialContext(env);
      }


      ------------------------------------------------------------

      I am looking up the data source via:

      DataSource datasource = (DataSource)context.lookup("java:/SapdbDS");


      --------------------------------------------------------------

      I do this from the client - and I get the error described at the begining of the post. From various other posts I have stumbled upon I was under the impression that this should work. I am most obviously missing something. Any ideas?




      Thanks
      Ray