4 Replies Latest reply on Dec 30, 2017 3:59 PM by emeuwese

    Wildfly 11 Pervasive JDBC Driver

    a11jbd

      Hi.

       

      I'm trying to add a datasource in Wildfly 11.0, but when i test connection this the error message that throws:

       

      18:11:13,540 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "datasources"),
          ("data-source" => "RSBankDS")
      ]) - failure description: {
          "WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.pervasive"],
          "WFLYCTL0180: Services with missing/unavailable dependencies" => [
              "org.wildfly.data-source.RSBankDS is missing [jboss.jdbc-driver.pervasive]",
              "jboss.driver-demander.java:jboss/datasources/Actian is missing [jboss.jdbc-driver.pervasive]"
          ]
      }
      18:11:13,540 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
          ("subsystem" => "datasources"),
          ("data-source" => "RSBankDS")
      ]) - failure description: {
          "WFLYCTL0412: Required services that are not installed:" => [
              "jboss.jdbc-driver.pervasive",
              "jboss.jdbc-driver.pervasive"
          ],
          "WFLYCTL0180: Services with missing/unavailable dependencies" => [
              "org.wildfly.data-source.RSBankDS is missing [jboss.jdbc-driver.pervasive]",
              "jboss.driver-demander.java:jboss/datasources/Actian is missing [jboss.jdbc-driver.pervasive]",
              "org.wildfly.data-source.RSBankDS is missing [jboss.jdbc-driver.pervasive]"
          ]
      }
      18:11:13,587 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
      WFLYCTL0184:    New missing/unsatisfied dependencies:
            service jboss.jdbc-driver.pervasive (missing) dependents: [service org.wildfly.data-source.RSBankDS, service jboss.driver-demander.java:jboss/datasources/Actian]
      

       

      datasource in standalone.xml:

      <datasources>
           <datasource jndi-name="java:jboss/datasources/Actian" pool-name="RSBankDS" enabled="true">
                <connection-url>jdbc:pervasive://192.168.0.171:1583/RSBANK.LOCAL;encoding=cp866</connection-url>
                <driver>pervasive</driver>
                <security>
                     <user-name>dbuser</user-name>
                     <password>pwd</password>
                </security>
           </datasource>
           <drivers>
                <driver name="pervasive" module="com.pervasive.jdbc.v2">
                     <driver-class>com.pervasive.jdbc.v2.Driver</driver-class>
                </driver>
           </drivers>
      </datasources>
      
      

       

      and the module.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <module xmlns="urn:jboss:module:1.5" name="com.pervasive.jdbc.v2">
           <resources>
                <resource-root path="pvjdbc2.jar"/>
           </resources>
           <dependencies>
                <module name="javax.api"/>
                <module name="javax.transaction.api"/>
           </dependencies>
      </module>
      

        driver jar: {WILDFLY_HOME}/modules/system/layers/base/com/pervasive/main/pvjdbc2.jar

       

      Why this error appears? what i could have forgotten to config?

        • 1. Re: Wildfly 11 Pervasive JDBC Driver
          zcc39r

          Try to install this driver as a regular deployment. Note that it doesn't contain META-INF/services/java.sql.Driver. So you need to modify the JAR. See DataSource configuration.

          • 2. Re: Wildfly 11 Pervasive JDBC Driver
            zhurlik

            For me looks like it works, but I did a small fix, I have used the folder '../wildfly-11.0.0.Final/modules/system/layers/base/com/pervasive/jdbc/v2/'

             

            /opt/wildfly-11.0.0.Final/modules/system/layers/base/com/pervasive

            └── jdbc

                └── v2

                    └── main

                        ├── module.xml

                        └── pvjdbc2.jar

             

            No errors in logs

            ...

            14:52:22,078 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-5) WFLYJCA0018: Started Driver service with driver-name = pervasive

            14:52:22,397 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) WFLYJCA0001: Bound data source [java:jboss/datasources/Actian]

            • 3. Re: Wildfly 11 Pervasive JDBC Driver
              lafr

              Correct, name of the driver in module.xml (com.pervasive.jdbc.v2) has to match with the sub-directory name: com.pervasive.jdbc.v2 --> com/pervasive/jdbc/v2.

              I personally prefer to put the artifacts not under $JBOSS_HOME/modules/system/layers/base but directly unter $JBOSS_HOME/modules.

              Keeping system/layers/base as it comes orginally with the installation.

               

              • 4. Re: Wildfly 11 Pervasive JDBC Driver
                emeuwese

                I personally prefer to put the artifacts not under $JBOSS_HOME/modules/system/layers/base but directly unter $JBOSS_HOME/modules.

                Keeping system/layers/base as it comes orginally with the installation.

                It's possible to add custom layers. It requires adding layers.conf to $JBOSS_HOME\modules

                layers=mycustomlayer

                Then you can store all added artifacts in the same structure in a separate layer. You can add multiple layers if necessary.

                $JBOSS_HOME\modules\system\layers\mycustomlayer\com\pervasive\jdbc\v2