3 Replies Latest reply on Oct 25, 2013 11:05 AM by Wolf-Dieter Fink

    DB2 DB connection - Jboss 7.1.1

    eramesh.java Newbie

      Hi Team,


      We are doing migration from Jboss4 to Jboss 7.1.1 Final.


      I am not able to connect DB2.


      Please find my ds.xml file which is currently working in Jboss4.





          <connection-url>jdbc:as400://xxxxx;transaction isolation=none</connection-url>







        <new-connection-sql> SELECT COUNT(*) FROM xxxx </new-connection-sql>

        <check-valid-connection-sql> SELECT COUNT(*) FROM xxxx</check-valid-connection-sql>







      Accordingly I have configured in standalone.xml  file


      <datasource jndi-name="java:jboss/datasources/exampleDS" pool-name="exampleDS" enabled="true" use-ccm="false">

                          <connection-url>>jdbc:as400://xxx;transaction isolation=none</connection-url>



                          <new-connection-sql>SELECT COUNT(*) FROM xxx</new-connection-sql>






                              <check-valid-connection-sql>SELECT COUNT(*) FROM xxx</check-valid-connection-sql>











                          <driver name="db2" module="com.ibm.as400">







      <module xmlns="urn:jboss:module:1.0" name="com.ibm.as400">
      <resource-root path="jt400.jar"/>

      <module name="javax.api"/>
      <module name="javax.transaction.api"/>


      Now I am getting the below exception.


      JBAS014775: New missing/unsatisfied dependencies: service jboss.jdbc-driver.oracle (missing) dependents:


      Could you please advise!






        • 1. Re: DB2 DB connection - Jboss 7.1.1
          Tomas Remes Expert

          You probably don't  have defined any driver with name "oracle". Your driver is called "d2" according to <driver name="db2" module="com.ibm.as400">. Next I am not really sure about your connection url. Shouldn't this start with "jdbc:db2" prefix? I guess so. I also guess that you can't specify transaction isolation in your connection url. There's special element for this. You can check jboss-as-datasources_1_0.xsd in your $JBOSS_HOME/docs/schema. This might be useful DB2 datasource (non-XA) working for JBoss AS 7.1.1 as well.

          • 2. Re: DB2 DB connection - Jboss 7.1.1
            eramesh.java Newbie

            Hi Tomas,


            Thanks for the reply.


            I have modified the driver name to d2.

            But, I have placed jt400.jar in the modules folder under  \ jboss-as-7.1.1.Final\modules\com\ibm\as400\main.


            Is this the right jar & is this the right place?


            Please advise!

            • 3. Re: DB2 DB connection - Jboss 7.1.1
              Wolf-Dieter Fink Master

              the modul name is the directory. So com/ibm/as400 is the correct path for the module com.ibm.as400.

              As you might have several versions of this module the default slot is "main" if you not set a module slot.

              So yes the directory is correct.


              If the jt400.jar is compatible with the used DB and JVM it should work. But for that you might have a look to the DB site.


              What error message do you see if you start the server? JBAS014775 is only a following message, not the reason of the failure if the module can not be loaded.