0 Replies Latest reply on Sep 25, 2003 7:53 AM by null null

    jboss 3.0.6 db2 connection

    null null Newbie

      I run JBOSS 3.0.6 with jetty.
      I have configured JBOSS for connection pool
      to access a IBM db2 database on windows 2000 machine.
      I have included in the JBOSS_HOME/lib folder
      db2java.jar and DB2 client is running on the application server machine.

      When I call the code

      try {
      Connection conn = myDatasource.getConnection();

      conn.close();
      }catch(SQLException e){
      out.println("ecc sql" + e.getMessage());
      }


      to get a connection I receive the error below.
      Do anyone know how to sort my problem out?

      Thanks...
      U.



      2003-09-25 15:32:04,107 WARN [org.jboss.jbossweb] WARNING: Exception for /test.jsp
      java.lang.NoSuchFieldError: indicators
      at COM.ibm.db2.jdbc.app.DB2Driver.SQLAllocEnv(Native Method)
      at COM.ibm.db2.jdbc.app.DB2Driver.(DB2Driver.java:249)
      at COM.ibm.db2.jdbc.app.DB2Driver.(DB2Driver.java:131)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
      at java.lang.Class.newInstance0(Class.java:296)
      at java.lang.Class.newInstance(Class.java:249)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.checkDriver(LocalManagedConnectionFactory.java:438)
      at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFactory.java:130)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnection(InternalManagedConnectionPool.java:259)
      at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:106)
      at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:323)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:467)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.getManagedConnection(LocalTxConnectionManager.java:221)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:532)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:822)
      at org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(LocalDataSource.java:102)
      at org.apache.jsp.test$jsp._jspService(test$jsp.java:159)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:280)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:553)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1717)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:549)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1667)
      at org.mortbay.http.HttpServer.service(HttpServer.java:862)
      at org.jboss.jetty.Jetty.service(Jetty.java:497)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:759)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:923)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:776)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:202)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)