I am working with a Web application written in cocoon framework (Java) and running on WAS 7.0.0.0. When running on WAS 6.X.X.X everything works fine.
However, on WAS 7 during runtime I am receiving 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 that this is a ClassLoader issue.
I have tried many steps to overcome this issue:
I have tried to add in the WAS Administration Console a new Custom properties:
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 resolve the problem!
I tried to change the WAS class loader order in the WAS Admin Console between parent first and parent last - both options did not resolve the issue.
Please let me know if you need additional information.