4

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:

  1. 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!

  2. 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.

Ofir Winegarten
  • 9,215
  • 2
  • 21
  • 27
amitil
  • 41
  • 2

1 Answers1

0

Because was7 must have these jars inbuilt. You need to remove these jars from your ear/war and then deploy. Multiple copies of the same jars are conflicting.

Regards,

Ravi Trivedi
  • 2,340
  • 2
  • 14
  • 20