3 Replies Latest reply on Dec 29, 2011 5:05 AM by guinotphil

    nekohtml module : SAX issue

    guinotphil Apprentice

      Hello,

       

      I came with the following error using the net.sourceforge.nekohtml module:

       

      handled and logged exception - API: java.lang.ClassNotFoundException: org.xml.sax.SAXNotSupportedException from [Module "net.sourceforge.nekohtml:main" from local module loader @28ab54eb (roots: C:\DEV\jboss-as-7.1.0.Final-SNAPSHOT\modules)]

       

       

      This is because the module does not have a dependency to the org.xml.sax package.

       

      I guess this will be corrected soon for the Final release of AS7.

       

      Anyway, should I add a dependency to javax.api in the net.sourceforge.nekohtml module ? Or should I add some exports in the org.apache.xerces module defintion (as nekohtml depends only on xerces which depends on javax.api) ?

        • 1. Re: nekohtml module : SAX issue
          jaikiran pai Master

          What does the entire exception stacktrace look like?

          • 2. Re: nekohtml module : SAX issue
            guinotphil Apprentice

            Sorry, I didn't copied it, but adding  a dependency to javax.api in the net.sourceforge.nekohtml module fixed the problem.

             

            I'll check that again and give you the details to produce the problem once again.

            • 3. Re: nekohtml module : SAX issue
              guinotphil Apprentice

              Here are the details:

               

              (http--127.0.0.1-80-1) handled and logged exception - API: java.lang.ClassNotFoundException: org.xml.sax.SAXNotSupportedException from [Module "net.sourceforge.nekohtml:main" from local module loader @62acc57 (roots: C:\DEV\jboss-as-7.1.0.Final-SNAPSHOT\modules)]

                     at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                     at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)

                     at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                     at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                     mypackage.MyClass.myMethod(MyClass.java:235) [MyEJB.jar:]

               


              And, here is the code from MyClass which throws the exception:

              final org.cyberneko.html.parsers.DOMParser parser = new org.cyberneko.html.parsers.DOMParser();

               

               

              But, I just realized that I'm using nekohtml 1.9.15 instead of 1.9.14, which must be the reason why I only get the problem.