Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-793

Cannot add custom modules to WildFly Swarm using <resource-root> instead of <artifact> in the module.xml

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Done
    • 2016.10.0
    • 2016.12.1
    • core
    • None

    Description

      JDBC drivers (DB2, Oracle, etc) not available to WildFly Swarm when added as modules (like in WildFly/EAP) using <resource-root> instead of <artifact> in the module.xml.

      Custom module "oracle.jdbc" (module.xml and JAR) copied into Uber-JAR's "modules\oracle\jdbc\main" directory (there are also some default modules there - jboss, javax, etc) when module is configured like this:

         <resources>
            <resource-root path="oracle-driver-ojdbc6.jar"/>
         </resources>
      

      However, when running app (driver and datasource configured in the standalone.xml), I'm getting this error:

      [jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 21) WFLYJCA0086: Unable to find driver class name in "oracle" jar
      

      However, when it is configured in module.xml as:

            <artifact name="com.hynnet:oracle-driver-ojdbc6:12.1.0.1"/>
      

      JAR is copied to "m2repo\com\hynnet\oracle-driver-ojdbc6\12.1.0.1" directory of Uber-JAR and driver was successfully loaded.

      Looks like WFS adding to classpath only what is in "m2repo", but not the "oracle" module in "modules" directory.
      Am I missing some command-line parameter to define location of the custom modules, like "JBOSS_MODULEPATH" for JBoss EAP6?

      Attachments

        Issue Links

          Activity

            People

              bmcwhirt@redhat.com Bob McWhirter (Inactive)
              jflint_jira Andrey Yamshchikov (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: