0 Replies Latest reply on Jun 4, 2015 10:47 AM by midlman

    "Module" defined not being put on classpath for webapp

    midlman

      Using EAP6

      I'm trying to figure out how to put a bunch of jars that I have been including in my .wars, on the classpath instead.

      I experimented by putting the following in my JBoss "./modules/org/apache/activemq/main" directory

      module.xml =

      <module xmlns="urn:jboss:module:1.1" name="org.apache.activemq">

       

        <resources>

         <resource-root path="activemq-camel-5.11.0.jar"/>

         <resource-root path="activemq-http-5.11.0.jar"/>

         <resource-root path="activemq-pool-5.11.0.jar"/>

         </resources>

      /module>

       

      and included the jar files in that dir as well.

       

      Then I added:

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">

          <deployment>

             <dependencies>

                <module name="org.apache.activemq" slot="main"/>

             </dependencies>

          </deployment>

      </jboss-deployment-structure>

       

      as a jboss-deployment-structure.xml in WEB-INF

       

      However, when I load the app, it doesn't find the jars.

      10:02:02,304 WARN  [org.jboss.modules] (ServerService Thread Pool -- 115) Failed to define class org.apache.activemq.pool.PooledConnectionFactory in Module "org.apache.activemq:main" from local module loader @3ef9ead4 (finder: local module finder @9a82499 (roots: C:\JBOSS\jbdevstudio\runtimes\jboss-eap\modules,C:\JBOSS

      \jbdevstudio\runtimes\jboss-eap\modules\system\layers\base)): java.lang.LinkageError: Failed to link org/apache/activemq/pool/PooledConnectionFactory (Module "org.apache.activemq:main" from local module loader @3ef9ead4 (finder: local module finder @9a82499 (roots: C:\JBOSS\jbdevstudio\runtimes\jboss-eap\modules,C:\JBO

      SS\jbdevstudio\runtimes\jboss-eap\modules\system\layers\base)))        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428) [jboss-modules.jar:1.3.0.Final-redhat-2] ....

       

      Then lots of "link" errors

       

      What am I missing????

      Thanks

      Clint