Variation of "Cannot be cast to javax.xml.parsers.SAXParserFactory" error

My circumstance is a variation of the question & answers posted to and am still looking for an answer - I'm getting the same error (with the exception it says crimson is incompatible instead of xerces) but I added no plugins. I upgraded my machine from Websphere 7.5 to 8.5 and made no explicit changes. I added, removed, or changed NO jars in my environment. Other than updated jars put in place by the IBM installation manager when upgrading to 8.5, nothing was changed. My websphere v7.5 worked just fine w/o any errors prior to this upgrade. Would you have any solution given my circumstance?


1 answer

Ok, I found the solution. With the goal of replacing crimson_1.1.1.jar, I looked for other jars (on my machine) having the class SAXParserFactoryimpl. I found it in several jars, two in particular: xercesimpl-2.8.0 and xercesimpl-2.9.1. I ultimately picked xercesimpl-2.8.0.jar because I needed to include another jar in my app, commons-fileupload-1.2.jar. When I downloaded this commons package to include it into my app, it came with xercesimpl-2.8.0.jar. So with that as the connection, I removed all references to crimson_1.1.1.jar and replaced it with xercesimpl-2.8.0.jar in my application. I also had to set my EAR's deployment descriptor (EAR > deployment descriptor > Deployment tab > Application section) to PARENT_FIRST for Classloader mode and APPLICATION for WAR classloader policy. Once done, my server start occurred w/o errors and no longer got the error of "org.apache.crimson.jaxp.SAXParserFactoryImpl incompatible with javax.xml.parsers.SAXParserFactory".

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Sunday in Feedback & Announcements

How do you analyze GC logs, thread dumps and head dumps?

Hi awesome community!  In this article, I would like to describe the one of the toolset (service) for the analyze some problems on different Java-based instances, of course, as Atlassian admini...

108 views 0 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you