1 Reply Latest reply on Nov 30, 2003 7:53 PM by Jon Barnett

    javax.naming.NameNotFoundException: SecureDS not bound


      I have configured a datasource with JNDI name SecureDS. However, I don't see the JNDI name
      in the jmx-console and am not able to grab
      the DS from the context, what am I doing wrong?

      InitialContext ctx = new InitialContext();
      theDataSource = (javax.sql.DataSource)ctx.lookup(dataSourceName);

      Caused by: javax.naming.NameNotFoundException: SecureDS 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:282)


      <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager

      Thanks for the help.

        • 1. Re: javax.naming.NameNotFoundException: SecureDS not bound
          Jon Barnett Master

          Check that you are getting something like the following in your server.log:

          2003-11-30 15:30:39,017 INFO [org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.AmityPool] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=LocalTxCM,name=SecureDS to JNDI name 'java:/SecureDS'

          If so, the datasource should have been successfully created. Otherwise, check for any failures in the server.log related to SecureDS.

          If everything is fine, make sure that you are referring to java:/SecureDS in the lookup. However, since you say you can't find the datasource, you can probably assume the start up was not successful.

          Hope that gives you a place to start looking.