2 Replies Latest reply on Nov 20, 2001 11:37 AM by Niall

    DB2v7.2 - Unable to create datasource

    Niall Newbie

      Hi,

      I've just upgraded from DB2 v6.1 to v7.2 and JBoss is no longer able to start up. I get the following:



      COM.ibm.db2.jdbc.net.DB2Driver



      org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
      xpb
      jdbc:db2://localhost/xpb
      db2admin
      db2admin
      0
      true



      [TransactionManagerService] Starting
      [TransactionManagerService] Started
      [ClientUserTransactionService] Starting
      [ClientUserTransactionService] Started
      [JaasSecurityManagerService] Starting
      [JaasSecurityManagerService] startService, cachePolicy=null
      [JaasSecurityManagerService] startService, SecurityProxyFactory=org.jboss.security.SubjectSecurityProxyFactory@2acc65
      [JaasSecurityManagerService] Started
      [JdbcProvider] Starting
      [JdbcProvider] Started
      [XADataSourceLoader] Starting
      [xpb] XA Connection pool xpb bound to java:/xpb
      [xpb] COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0616E Error opening socket. SQLSTATE=08S01
      [xpb] Pool xpb factory org.jboss.pool.jdbc.xa.XAConnectionFactory@79935d unable to create new object!
      [xpb] Pool xpb [0/0/Unlimited] couldn't find an object to return!
      [XADataSourceLoader] Stopped
      java.lang.NullPointerException
      at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:178)
      at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:407)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:836)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:210)
      at org.jboss.Main$1.run(Main.java:116)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:112)
      [Configuration] java.lang.NullPointerException
      [Configuration] at org.jboss.pool.jdbc.xa.XAPoolDataSource.getConnection(XAPoolDataSource.java:178)
      [Configuration] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:407)
      [Configuration] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107)
      [Configuration] at java.lang.reflect.Method.invoke(Native Method)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Configuration] at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:83
      6)
      [Configuration] at $Proxy0.start(Unknown Source)
      [Configuration] at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
      [Configuration] at java.lang.reflect.Method.invoke(Native Method)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Configuration] at org.jboss.Main.(Main.java:210)
      [Configuration] at org.jboss.Main$1.run(Main.java:116)
      [Configuration] at java.security.AccessController.doPrivileged(Native Method)
      [Configuration] at org.jboss.Main.main(Main.java:112)


      I have my db2java.zip (the driver) inside the jboss\lib\ext directory. Everything was working fine until I upgraded my database, and the database is working perfectly under other applications (eg WebSphere). I'm using the same jboss.jcml options as the previous time aswell and have tried with both jboss 2.4.1 and 2.4.3. I also have jdbc2 support switched on for DB2 (by running the \java12\usejdbc2.bat program).

      As a 'stab in the dark' I tried using a DB2 datasource class instead of JBoss pool wrapper and got the following:


      COM.ibm.db2.jdbc.net.DB2Driver



      COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource
      xpb
      jdbc:db2://localhost/xpb
      db2admin
      db2admin
      0
      true



      [TransactionManagerService] Starting
      [TransactionManagerService] Started
      [ClientUserTransactionService] Starting
      [ClientUserTransactionService] Started
      [JaasSecurityManagerService] Starting
      [JaasSecurityManagerService] startService, cachePolicy=null
      [JaasSecurityManagerService] startService, SecurityProxyFactory=org.jboss.security.SubjectSecurityProxyFactory@2acc65
      [JaasSecurityManagerService] Started
      [JdbcProvider] Starting
      [JdbcProvider] Started
      [XADataSourceLoader] Starting
      [XADataSourceLoader] Stopped
      java.lang.ClassCastException: COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource
      at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:345)
      at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:836)
      at $Proxy0.start(Unknown Source)
      at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.Main.(Main.java:210)
      at org.jboss.Main$1.run(Main.java:116)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.Main.main(Main.java:112)
      [Configuration] java.lang.ClassCastException: COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource
      [Configuration] at org.jboss.jdbc.XADataSourceLoader.startService(XADataSourceLoader.java:345)
      [Configuration] at org.jboss.util.ServiceMBeanSupport.start(ServiceMBeanSupport.java:107)
      [Configuration] at java.lang.reflect.Method.invoke(Native Method)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Configuration] at org.jboss.configuration.ConfigurationService$ServiceProxy.invoke(ConfigurationService.java:83
      6)
      [Configuration] at $Proxy0.start(Unknown Source)
      [Configuration] at org.jboss.util.ServiceControl.start(ServiceControl.java:81)
      [Configuration] at java.lang.reflect.Method.invoke(Native Method)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      [Configuration] at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      [Configuration] at org.jboss.Main.(Main.java:210)
      [Configuration] at org.jboss.Main$1.run(Main.java:116)
      [Configuration] at java.security.AccessController.doPrivileged(Native Method)
      [Configuration] at org.jboss.Main.main(Main.java:112)

      I don't have a clue whats wrong, and am following the same procedure I followed with using the older DB2 version (which I was using happily for a few months).

      Has anyone gotten JBoss running with DB2v7.2? I notice the documentation only covers DB2v7.1.

      tnks,
      Ceolter.

        • 1. Re: DB2v7.2 - Unable to create datasource
          Don Laidlaw Newbie

          I have this working. You are using the net driver so you should make sure that the net server is running. On NT the service is called "DB2 JDBC Applet Server" and it runs on port 6789 by default. Otherwise you can start one on any port with the command "db2jstrt <port#>" eg. (db2jstrt 6789).
          Then set the port number on your connection URL.
          jdbc:db2://localhost:6789/xpb

          That is all I have to suggest. I am using DB2 7.2 though. With the net driver. On the localhost.

          • 2. Re: DB2v7.2 - Unable to create datasource
            Niall Newbie

            thanks don,

            your information was most helpful, my problem appears to be that my JDBC Applet Server is not using the default port 6789 as when i start up a new server on a specified port from the command line it works fine.

            thanks again,