2 Replies Latest reply on Jun 6, 2005 1:49 PM by Michael Aplin

    JBOSS - DB2

    filth Newbie

      Whath's wrong ?
      The file DB2JAVA.LIB (/default/deploy) and it's working
      with DBVisualizer ... but in JBOSS ...

      09:56:05,244 ERROR [STDERR] org.jboss.util.NestedSQLException: Apparently wrong driver class specified
      for URL: class: COM.ibm.db2.jdbc.app.DB2Driver, url: jdbc:db2://PTT0610MTW0S:6789/POLITICA; - nested
      throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL
      : class: COM.ibm.db2.jdbc.app.DB2Driver, url: jdbc:db2://PTT0610MTW0S:6789/POLITICA)
      09:56:05,244 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(Wra
      pperDataSource.java:106)

      Can anyone help-me please ?

        • 1. Re: JBOSS - DB2
          Wolf-Christian Herold Newbie

          Hi
          I'm using DB2 8.1.4 with jboss 3.2.3.
          I#m using the JCC type 4 driver because we found this to be faster than appdriver and much easier to install.
          Therefor you need the files:

          db2jcc.jar
          and may be one or both of these
          db2jcc_license_cisuz.jar db2jcc_license_cu.jar

          It works fine in our case.

          good luck
          regards Christian


          <local-tx-datasource>
          <jndi-name>db2</jndi-name>
          <connection-url>jdbc:db2://IP:PORT/NAME</connection-url>
          <driver-class>com.ibm.db2.jcc.DB2Driver</driver-class>
          <user-name>??</user-name>
          ??
          <min-pool-size>3</min-pool-size>
          <max-pool-size>10</max-pool-size>
          <blocking-timeout-millis>5000</blocking-timeout-millis>
          <idle-timeout-minutes>15</idle-timeout-minutes>

          <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
          </local-tx-datasource>


          • 2. Re: JBOSS - DB2
            Michael Aplin Newbie

            The DB2 Type 2 driver requires the URL to be in the fomat jdbc:db2:clientname, where client name is the name of the database as it is configured on your local machine using the DB2 client configuration utility.

            The jdbc:db2:machine:port/name format only works for the new Type 4 driver found in the 8.1 JAR.