0

I have a problem with Weblogic classloader.

When I try to deploy my app on WL 12.2.1.2.0 it fails. In the logs on my server I see

java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal

The class belongs to xml-apis library. The library comes into my app with another dependency(so as transitive dependency). The version of xml-apis is 1.4.01.

After that I added exception in my deployment descriptor:

<container-descriptor>
    <prefer-application-packages>
        <package-name>org.w3c.dom.*</package-name>
    </prefer-application-packages>
</container-descriptor>

And later a new deployment. The described issue with org.w3c.dom.ElementTraversal was solved. There is no any information about missing org.w3c.dom.ElementTraversal class anymore.

But there is a new issue: java.lang.ClassNotFoundException: org.w3c.dom.Document

After analysis I figured out that org.w3c.dom.Document class comes from JRE(jre/lib/rt.jar). So in deployment descriptor I've said:

"if I need something from org.w3c.dom.* package - please load it from my app distribution". And now there is such inconsistency.

I've had idea to use WL Classloader Analysis Tool(CAT) but it is impossible because the deploy was failed.

Excluding xml-apis and xerces libraries from my ear we mentioned here didn't help me.

Does anybody have idea how to solve my problem?

Thanks in advance for your answers.

1 Answers1

0

Excluding xercexImpl library from my EAR without changing the deployment descriptor was solved my problem. Mentioned classes during new deployment were loaded from WL distribution.