1 Reply Latest reply on Aug 17, 2011 5:59 AM by webmarck

    Classpath issue with module

    webmarck

      Hello

       

      I have several ears that depends on XMLBeans and I have for that reason tried to create a xmlbeans module with a module.xml like this

       

      <module xmlns="urn:jboss:module:1.0" name="org.apache.xmlbeans" slot="2.5.0">

        <resources>

          <resource-root path="jsr173_1.0_api.jar"/>

          <resource-root path="resolver.jar"/>

          <resource-root path="xbean.jar"/>

          <resource-root path="xbean_xpath.jar"/>

          <!-- This should only be needed with JDK 1.4 -->

          <resource-root path="xmlbeans-qname.jar"/>

        </resources>

        <dependencies>

        </dependencies>

      </module>

       

      But I keep getting a

       

      Caused by: java.lang.ClassNotFoundException: org.w3c.dom.Node from [Module "org.apache.xmlbeans:2.5.0"

       

      I start Jboss with JDK 1.6 so both javax.xml.namespace.QName and w3c.dom.Node should be avaliable. How do make the module use java 1.5 specific classes?

        • 1. Re: Classpath issue with module
          webmarck

          I found a solution

           

          <module xmlns="urn:jboss:module:1.0" name="org.apache.xmlbeans" slot="2.5.0">

            <resources>

              <resource-root path="jsr173_1.0_api.jar"/>

              <resource-root path="resolver.jar"/>

              <resource-root path="xbean.jar"/>

              <resource-root path="xbean_xpath.jar"/>

            </resources>

            <dependencies>

              <module name="javax.api" slot="main" export="true"/>   

            </dependencies>

          </module>

           

          does the trick