Class from rt.jar not found

In JBOSS EAP 6 (AS 7):

I call Spring WebServiceTemplate.marshalSendAndRecieve which, in turn, makes it difficult to find the class that appears in rt.jar

Caused by: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DocumentImpl 

I do not understand how this can happen? Is everything that is in rt.jar loaded at startup?

Any ideas?

Thanks,

Kenny

+7
source share
1 answer

Ok, I found a solution (not sure if it is correct, but it works).

I noticed, when launching java -verbose: class, that only some of the classes in rt.jar were loaded, and not the one I needed (com.sun.org.apache.xerces.internal.dom.DocumentImpl)

So, in JBoss EAP 6 (As 7) there is a module directory ($ JBOSS_HOME / modules /) And here there is sun / jdk / main / modules.xml

I added the following entries:

 <path name="com/sun/org/apache/xerces/internal/dom"/> <path name="com/sun/org/apache/xerces/internal/xni"/> <path name="com/sun/org/apache/xerces/internal/jaxp"/> 

(last 2 because of the subsequent class no exceptions were found after adding to dom)

As I said, I'm not 100% sure if this is the right way to do this. Any input is welcome!

Thanks,

Kenny

+13
source

All Articles