9 Replies Latest reply on Dec 31, 2012 6:49 AM by Vivek Mittal

    jdbc-driver.jt400_jar (missing) dependents

    Vivek Mittal Newbie

      Hi,

       

      I am trying to create a datasource for DB2 for iseries:

       

      As I try and deploy the jt400.jar I get the following info messages:

       

      11:13:41,502 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014775:    New missing/unsatisfied dependencies:

            service jboss.jdbc-driver.jt400_jar (missing) dependents: [service jboss.data-source.java:jboss/datasources/jdbc/testDefaultDS].

       

      Can someone please let me know why is this message being flashed and is this DS created or not?

       

      Thanks

      Vivek

        • 1. Re: jdbc-driver.jt400_jar (missing) dependents
          Vivek Mittal Newbie

          Also wopuld like to share the following error when I check through the admin console:

           

          Unknown error

          Unexpected HTTP response: 500

          Request
          {
              "address" => [
                  ("subsystem" => "datasources"),
                  ("data-source" => "DataSourceName"),
                  ("statistics" => "pool")
              ],
              "operation" => "read-resource",
              "include-runtime" => true
          }

          Response

          Internal Server Error
          {
              "outcome" => "failed",
              "failure-description" => "JBAS014739: No handler for read-resource at address [
              (\"subsystem\" => \"datasources\"),
              (\"data-source\" => \"DataSourceName\"),
              (\"statistics\" => \"pool\")
          ]",
              "rolled-back" => true
          }

          • 2. Re: jdbc-driver.jt400_jar (missing) dependents
            Nicklas Karlsson Master

            It looks like the DS hasn't been created. Follow the instructions in https://docs.jboss.org/author/display/AS71/DataSource+configuration for creating a driver module and referencing to it.

             

            The 500 looks a bit strange, the console shouldn't do that even if there was a problem with the DS creation.

            • 3. Re: jdbc-driver.jt400_jar (missing) dependents
              Vivek Mittal Newbie

              Hi Nicklas,

               

              Thanks for the reply.

               

              I followed the various links and  did the following steps,

               

              I have placed the jt400.jar file in the modules folder by creating the following directory structure:
              \com\ibm\as400\main --> In this I have placed the jt400.jar and the module.xml which contains following:
              <?xml version="1.0" encoding="UTF-8"?>
              <module xmlns="urn:jboss:module:1.0" name="com.ibm.as400">
              < resources><resource-root path="jt400.jar"/>
              </resources>
              <dependencies>
              <module name="javax.api"/>
              <module name="javax.transaction.api"/>
              < /dependencies>
              </module>
              Now I have placed an entry fr the same in the standalone.xml for getting this driver:
              <driver name="DB2JDBCDriver" module="com.ibm.as400"> <!-- This line has been added -->
              <datasource-class>com.ibm.as400.access.AS400JDBCDriver</datasource-class>
              </driver>
              still I am not able to see this driver...
              Also I tried the same thing with the domain,xml but still I am not able to view the driver in admin console.
              can you please tell me... is there something I am missing...

               

              Best Regards,

              Vivek

              • 4. Re: jdbc-driver.jt400_jar (missing) dependents
                Nicklas Karlsson Master

                What does the datasource definition look like?

                 

                Wonder where the underscore in the service jboss.jdbc-driver.jt400_jar comes from? Does the AS always show it like that?

                • 5. Re: jdbc-driver.jt400_jar (missing) dependents
                  Vivek Mittal Newbie

                  Hi Nicklas,

                   

                  I just followed link mentioned in your reply.

                   

                  But I am getting the following message:

                   

                  13:17:36,441 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
                  JBAS014775:    New missing/unsatisfied dependencies:
                        service jboss.jdbc-driver.as400 (missing) dependents: [service jboss.data-source.java:/jdbc/testDefaultDS]

                   

                  I also tried placing the jt400.jar directly in the deployments folder, in this case the jt400.jar is shown as deployed:

                  13:17:36,464 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "jt400.jar"
                  13:17:36,828 INFO  [org.jboss.as] (MSC service thread 1-8) JBAS015951: Admin console listening on http://127.0.0.1:9990
                  13:17:36,830 ERROR [org.jboss.as] (MSC service thread 1-8) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 3082ms - Started 154 of 234 services (2 services failed or missing dependencies, 76 services are passive or on-demand)
                  13:17:36,872 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "jt400.jar"

                   

                  The question now is how to use this deployed jar file?

                   

                  Best Regards,

                  Vivek

                   

                  • 6. Re: jdbc-driver.jt400_jar (missing) dependents
                    Nicklas Karlsson Master

                    Not much use of deploying it as a JAR since it doesn't appear to be JDBC-compliant.

                     

                    Can you show the entire datasources subsystem configuration from standalone.xml?

                    • 7. Re: jdbc-driver.jt400_jar (missing) dependents
                      Vivek Mittal Newbie

                      Here it is:

                       

                      <subsystem xmlns="urn:jboss:domain:datasources:1.0">
                                  <datasources>
                                      <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                                          <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
                                          <driver>h2</driver>
                                          <security>
                                              <user-name>sa</user-name>
                                              <password>sa</password>
                                          </security>
                                      </datasource>
                                      <datasource jndi-name="java:/jdbc/testDefaultDS" pool-name="testDefaultDS" enabled="true" use-java-context="true">
                                          <connection-url>jdbc:as400:testDefaultServer;DB_CLOSE_DELAY=-1</connection-url>
                                          <driver>as400</driver>
                                          <security>
                                              <user-name>testUser</user-name>
                                              <password>testPwd</password>
                                          </security>
                                      </datasource>
                                      <drivers>
                                          <driver name="h2" module="com.h2database.h2">
                                              <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                                          </driver>
                                          <driver name="as400" module="com.ibm.as400"/>
                                      </drivers>
                                  </datasources>

                      • 8. Re: jdbc-driver.jt400_jar (missing) dependents
                        Nicklas Karlsson Master

                        You might need a driver-class or datasource-class attribute for the driver definition since the driver wasn't JDBC compliant in having a ServiceLoader name for the driver class.

                        • 9. Re: jdbc-driver.jt400_jar (missing) dependents
                          Vivek Mittal Newbie

                          Thanks Nicklas.

                           

                          You were correct, I was providing just drivername and xa-datasource class.

                           

                          But when I provided the driver-class along with this. I was successful in creating the DS.

                           

                          Thanks for the help.

                           

                          Cheers

                          Vivek