2 Replies Latest reply on Sep 23, 2003 2:41 PM by dongyu

    New To JBoss: JDBC datasource not bound exception

    dongyu

      Hi,

      I am new to Jboss(version 3.2.1) and trying to create a datasource.
      I copied and modified mssql-ds.xml and mssql-xa-ds.xml from the example and put them in the deploy directory.

      I can see in the console page that my new datasources are there. Also I get the following from jboss output:

      15:17:01,986 INFO [DefaultDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=Lo
      calTxCM,name=DefaultDS to JNDI name 'java:/DefaultDS'
      .......
      15:17:02,357 INFO [TxConnectionManager] Started
      15:17:02,367 INFO [TxConnectionManager] Starting
      15:17:02,367 INFO [MSSQLDS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=Loca
      lTxCM,name=MSSQLDS to JNDI name 'java:/MSSQLDS'
      15:17:02,367 INFO [TxConnectionManager] Started
      15:17:02,367 INFO [TxConnectionManager] Starting
      15:17:02,377 INFO [MSSQLXADS] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=XA
      TxCM,name=MSSQLXADS to JNDI name 'java:/MSSQLXADS'

      But, when I use a client program to lookup any of those datasources, (DefaultDS, MSSQLDS, MSSQLXADS), all of them throw exception like:

      javax.naming.NameNotFoundException: DefaultDS 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)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:492)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:471)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at j2src.LQTestClient.main(TestClient.java:89)

      What I am missing here ???

      Thanks,