Thursday, May 11, 2017

xmlparserv2.jar SAAJ0535: Unable to internalize message

Try this: unjar the file using the following command:
"C:\Program Files\Java\jdk1.7.0_02\bin\jar" -xvf xmlparserv2.jar
Change the entries in the files in the META-INF/services as follows:
  • for javax.xml.parsers.DocumentBuilderFactory replace oracle.xml.jaxp.JXDocumentBuilderFactory with com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl
  • for javax.xml.parsers.SAXParserFactory replace oracle.xml.jaxp.JXSAXParserFactory with com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
  • for javax.xml.transform.TransformerFactory replace oracle.xml.jaxp.JXSAXTransformerFactory with com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl
Re jar the file using the following command:
"C:\Program Files\Java\jdk1.7.0_02\bin\jar" -cvfm xmlparserv2.jar META-INF\MANIFEST.MF -c ./ .