1 Reply Latest reply on Oct 22, 2012 8:19 AM by Stephen Coy

    ClassNotFound: org.xml.sax.EntityResolver

    Waldo Nell Newbie

      I am trying to create a new module in JBoss AS 7.2.0 Alpha1. 

       

      {code}<module xmlns="urn:jboss:module:1.1" name="pwn-conf">

          <resources>

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

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

              <resource-root path="."/>

              <!-- Insert resources here -->

          </resources>

       

          <dependencies>

             <module name="org.apache.log4j" />

             <module name="org.dom4j" />

          </dependencies>

      </module>{code}

       

      When code from a RAR module tries to use classes from a.jar, it works up to the point where a.jar needs to make use of Dom4J calls, then it fails as follow:

       

      {code}Caused by: java.lang.NoClassDefFoundError: org/xml/sax/EntityResolver

                at net.za.a.support.AbstractApplicationContext.addBasicConfiguration(AbstractApplicationContext.java:142)

                at net.za.a.support.AbstractApplicationContext.addBasicConfiguration(AbstractApplicationContext.java:189)

                at net.za.a.b.rar.spi.AConnectionFactory.initServer(AManagedConnectionFactory.java:157)

                at net.za.a.b.rar.spi.AConnectionFactory.createConnectionFactory(AManagedConnectionFactory.java:129)

                at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1564)

                ... 7 more

      Caused by: java.lang.ClassNotFoundException: org.xml.sax.EntityResolver from [Module "pwn-conf:main" from local module loader @54281d4b (roots: /opt/jboss-as-7.2.0.Alpha1-src/jboss-as/build/target/jboss-as-7.2.0.Alpha1-SNAPSHOT/modules)]

                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.3.GA]

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.3.GA]

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.3.GA]

                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.3.GA]

                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.3.GA]

                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.3.GA]

                ... 12 more{code}

       

      Why can it not resolve org.xml.sax.EntityResolver when I confirmed it is contained in rt.jar in JDK 1.6.0.26 which I am using?