1 Reply Latest reply on Mar 1, 2012 8:00 AM by Sueleyman Vurucu

    java.lang.ClassNotFoundException: com.sun.org.apache.regexp.internal.RESyntaxException

    Sueleyman Vurucu Expert

      Hi guys,

       

      I got a ClassNotFoundExption today. The class RESyntaxException is located in rt.jar of sun jvm and in <jbosshome>\modules\org\apache\xalan\main\xalan-2.7.1.jbossorg-1.jar.

       

      The first question is why is this calss located in two jars.

       

      So far so good. For avoid this this exception I find the flowing workarround.

       

      1. In standalone.xml

          <subsystem xmlns="urn:jboss:domain:ee:1.0">
              <global-modules>
                  <module name="org.apache.xalan" slot="main"/>
                 
              </global-modules>
          </subsystem>

       

      2. In <jbosshome>\modules\org\apache\xalan\main\module.xml

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

       

          <resources>

              <resource-root path="serializer-2.7.1.jbossorg-1.jar"/>

              <resource-root path="xalan-2.7.1.jbossorg-1.jar"/>

              <!-- Insert resources here -->

          </resources>

       

          <dependencies>

                 <system export="true">

                  <paths>

                      <path name="com/sun/org/apache/regexp/internal"/>

                  </paths>

              </system>

              <module name="javax.api"/>

          </dependencies>

      </module>

       

      Is there a easier way to load this class ?? Why is not enough to define this module as a global module ??

        • 1. Re: java.lang.ClassNotFoundException: com.sun.org.apache.regexp.internal.RESyntaxException
          Sueleyman Vurucu Expert

          I find a better workarround,

           

          I define an own module and register org.apache.xalan as dependency.

           

          So my module.xml is shown below.

           

          <module xmlns="urn:jboss:module:1.1" name="com.siemag">

              <resources>

                  <!-- Insert resources here -->

              </resources>

           

              <dependencies>

                  <system export="true">

                      <paths>

                          <path name="com/sun/org/apache/regexp/internal" />

                      </paths>

                  </system>

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

              </dependencies>

           

          </module>

           

          But I don't still understand why I must wirte this section.

          <system export="true">

                      <paths>

                          <path name="com/sun/org/apache/regexp/internal" />

                      </paths>

                  </system>

          Any better idea ??