POI failure
java.lang.LinkageError: loader constraint violation in interface itable initialization:when resolving method "org.apache.xerces.parsers.AbstractSAXParser.getEntityResolver()Lorg/xml/sax/EntityResolver;" the class loader (instance of com/newatlanta/servletexec/ApplClassLoader) of the current class, org/apache/xerces/parsers/AbstractSAXParser, and the class loader (instance of <bootloader>) for interface org/xml/sax/XMLReader have different Class objects for the type org/xml/sax/EntityResolver used in the signature
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.xml.sax.helpers.NewInstance.newInstance(Unknown Source)
at org.xml.sax.helpers.XMLReaderFactory.loadClass(Unknown Source)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(Unknown Source)
at org.dom4j.io.SAXHelper.createXMLReader(SAXHelper.java:83)
at org.dom4j.io.SAXReader.createXMLReader(SAXReader.java:894)
at org.dom4j.io.SAXReader.getXMLReader(SAXReader.java:715)
at org.dom4j.io.SAXReader.read(SAXReader.java:435)
at org.dom4j.io.SAXReader.read(SAXReader.java:343)
at org.openxml4j.opc.internal.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:396)
at org.openxml4j.opc.internal.ContentTypeManager.<init>(ContentTypeManager.java:120)
at org.openxml4j.opc.internal.ZipContentTypeManager.<init>(ZipContentTypeManager.java:63)
at org.openxml4j.opc.ZipPackage.getPartsImpl(ZipPackage.java:147)
at org.openxml4j.opc.Package.getParts(Package.java:598)
at org.openxml4j.opc.Package.open(Package.java:227)
I meet the issue when I was using XMLBean on ServletExec. How can I solve it?
Remove the xercesImpl-jar from classpath of your application and re deploy it. Try that if any other issues raises due to removing the particular jar.Then do not remove the jar.Just extract the jar and remove the org.apache.xerces.parsers.AbstractSAXParser class file from xercesImpl-jar which gets conflicts and convert the remaining class file into jar and load it to the classpath.It would help you to solve the Linkage Error.
It seems like you are deploying the xerces-parser along with your application although it is already part of the server - and the server seems to choke on that. Try removing the xercesImpl-jar from your deployment, e.g. in case of maven set its scope to provided.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With