ClassLoader issue on WAS 7.0.0.0 - DocumentBuilderFactoryImpl

I am working with a cocoon web application (Java) and running on WAS 7.0.0.0. When working on WAS 6.XXX everything works fine.

However, in WAS 7, at runtime, I get the following error:

java.lang.ClassCastException org.apache.xerces.jaxp.DocumentBuilderFactoryImpl incompatible with javax.xml.parsers.DocumentBuilderFactory at javax.xml.parsers.DocumentBuilderFactory.newInstance

We suspect this is a ClassLoader problem.

I tried many steps to solve this problem:

  • I tried to add new custom properties to the WAS Administration Console:

    Application Servers → Server Name → Process Definition → Java Virtual Machine → Custom Properties

    • Name = javax.xml.parsers.DocumentBuilderFactory
    • Value = org.apache.xerces.jaxp.DocumentBuilderFactoryImpl

    But this did not solve the problem!

  • I tried changing the order of the WAS class loader in the WAS admin console between the parent first and parent last - both options did not fix the problem.

Please let me know if you need more information.

+4
source share
1 answer

Because was7 must have built-in banks. You need to remove these cans from the ear / war, and then deploy. Multiple copies of the same jar conflict.

Hello,

0
source

All Articles