0 Replies Latest reply on Feb 10, 2002 11:20 PM by kk

    NameNotFoundException when access DB2  connection pool in BM

    kk Newbie

      When i access the DB2 connection pool in BMP, it prompt me
      "javax.naming.NameNotFoundException: jdbc not bound"
      my jboss.jcml config is

      COM.ibm.db2.jdbc.app.DB2Driver



      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl<!-- [JBoss 2.4] -->
      DB2DS
      jdbc:db2:dev
      gdb
      password
      jdbc/DB2DS


      My client program is

      try {
      InitialContext initCtx = new InitialContext();
      System.out.println("got context");

      javax.sql.DataSource ds = (javax.sql.DataSource) initCtx.lookup("java:comp/env/jdbc/DB2DS");
      System.out.println("got datasource");

      initCtx.close();
      //return ds.getConnection();

      connection= ds.getConnection();

      } catch (Exception e) {
      System.out.println("error in getDBConnection :="+e);
      }