3 Replies Latest reply on Nov 28, 2017 8:01 AM by ramboid

    Datasource to DB2 with jt400

    ramboid

      How can I define a DB2 datasource in Wildfly 10?  I have added the jt400.jar to a module, as described in jdbc-driver.jt400_jar (missing) dependents.  I defined the driver in the datasources element.   Nevertheless, when I try to configure a data source via the administrator console, I get an error that seems to indicate that the driver is missing:

      Unexpected HTTP response: 500

       

      Request

      {

        "name" => "tfilesds",

        "jta" => true,

        "enabled" => true,

        "user-name" => "carlos",

        "password" => "working",

        "jndi-name" => "java:/tfilesDS",

        "use-ccm" => true,

        "pool-name" => "tfilesds_Pool",

        "connection-url" => "jdbc:as400://192.168.200.1",

        "driver-class" => "com.ibm.as400.access.AS400JDBCDriver",

        "driver-name" => "jt400",

        "operation" => "add",

        "address" => [

        ("subsystem" => "datasources"),

        ("data-source" => "tfilesds")

        ]

      }

       

      Response

       

      Internal Server Error

      {

        "outcome" => "failed",

        "failure-description" => {

        "WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.jt400"],

        "WFLYCTL0180: Services with missing/unavailable dependencies" => [

        "org.wildfly.data-source.tfilesds is missing [jboss.jdbc-driver.jt400]",

        "jboss.driver-demander.java:/tfilesDS is missing [jboss.jdbc-driver.jt400]"

        ]

        },

        "rolled-back" => true

      }

        • 1. Re: Datasource to DB2 with jt400
          jaikiran

          Please post the exact content of the module.xml of your JDBC driver module. Also post the location where that driver jar as well as the driver module resides on the filesystem.

          • 2. Re: Datasource to DB2 with jt400
            ramboid

            Hi,
            The module is as follows:
            <?xml version="1.0" encoding="UTF-8"?>
            <module xmlns="urn:jboss:module:1.1" name="com.ibm.as400">
            < resources>
               <resource-root path="jt400.jar"/>
            </resources>
            <dependencies>
               <module name="javax.api"/>
               <module name="javax.transaction.api"/>
            < /dependencies>
            </module>

            The location of the driver is:
            $WILDFLY_HOME/modules/system/layers/base/com/ibm/as400/main/jt400.jar

            • 3. Re: Datasource to DB2 with jt400
              ramboid

              Forgot to mention: The module.xml and the jt400.jar are in the following folder:

              $WILDFLY_HOME/modules/system/layers/base/com/ibm/as400/main