1 Reply Latest reply on Nov 25, 2003 3:04 AM by jonlee

    Jboss 3.2.1 + webservice + DB access = problems

    blueser

      Hi all, hope this is the right forum for this question.

      We're trying to export webservices which need to access a MySQL DB through JBoss' data connection pool.

      The webservices have been deployed successfully, but when it comes to access the DB, we're getting this error:

      [...]
      16:20:27,496 ERROR [DbConnectionManagerImpl] Error while loading JBOSS
      datasource pool connection
      javax.naming.NameNotFoundException: jdbc 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.server.NamingServer.lookup(NamingServer.java:256)
      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
      com.ntime.newmd.register.dbsystem.db.DbConnectionManagerImpl._loadDriver
      FromJboss(DbConnectionManagerImpl.java:112)
      at
      com.ntime.newmd.register.dbsystem.db.DbConnectionManagerImpl.(DbCo
      nnectionManagerImpl.java:52)
      at
      com.ntime.newmd.register.dbsystem.db.DbConnectionManagerImpl.getInstance
      (DbConnectionManagerImpl.java:186)
      at
      com.ntime.newmd.register.dbsystem.db.DbCarrierImpl._dbLoadFrom(DbCarrier
      Impl.java:527)
      at
      com.ntime.newmd.register.dbsystem.db.DbCarrierImpl.(DbCarrierImpl.
      java:50)
      at
      com.ntime.newmd.register.dbsystem.db.DbRegisterSystemManagerImpl.getCarr
      ier(DbRegisterSystemManagerImpl.java:250)
      at
      com.ntime.newmd.requestmanager.register.RegisterRequestManager.getCarrie
      r(RegisterRequestManager.java:651)
      at
      com.ntime.newmd.requestmanager.register.RegisterRequestManager.validateC
      ellPhone(RegisterRequestManager.java:245)
      at
      com.ntime.newmd.connector.webservice.Register.askForAPassword(Register.j
      ava:44)
      [...]
      16:20:28,249 INFO [DbConnectionManagerImpl] Using directly
      communication with datasource
      16:20:50,611 FATAL [DbCarrierImpl] Error while closing PreparedStatement
      java.lang.NullPointerException
      [...]

      Other than the webservice, we have beans which successfully access the datasource, so it's not totally misconfigured. However, the "javax.naming.NameNotFoundException: jdbc not bound" error suggests we're missing something on our configuration files.

      Our webservice configuration file is:

      <deployment xmlns="http://xml.apache.org/axis/wsdd/"
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">






      <operation name="unregister" qname="operNS:unregister"
      xmlns:operNS="http://...">
      <parameter name="xmlUserRegister" type="tns:UserImpl"
      xmlns:tns="http://..."/>



      <typeMapping xmlns:ns="http://..."
      qname="ns:UserImpl"
      type="java:com.ntime.newmd.xmldata.register.userconfig.impl.UserImpl"
      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
      encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>



      (URLs have been ommitted on purpose)

      Any hints?

      TIA

      Andre

        • 1. Re: Jboss 3.2.1 + webservice + DB access = problems
          jonlee

          It's hard to tell because the information probably isn't as pertinent to the problem. It looks like the JNDI lookup is failing. You need to show the lookup code as opposed to the datasource name defined in the *-ds.xml.

          You should also compare the Global JNDI name for the resource shown in jmx-console -> JNDIView -> list against what you think it is and what you are using in the lookup.