POI失敗POI失敗java.lang.LinkageError的:裝載機約束衝突接口itable初始化
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)
我遇到了問題,當我使用的ServletExec的XMLBean。我該如何解決它?
之後我刪除xercesImpl-JAR,我得到了新的異常:PanelXLReport \t 2013年11月26日17時01分15秒\t POI失敗\t \t java.lang.LinkageError的:裝載機約束衝突: 解決接口的方法「時,組織.xml.sax.XMLReader.setEntityResolver(Lorg/xml/sax/EntityResolver;)V「 當前類的類加載器(com/newatlanta/servletexec/ApplClassLoader的實例),org/dom4j/io/SAXReader, 和類裝載器(的實例)爲解決班,組織/ XML /薩克斯/ XMLReader的,有不同的Class對象在簽名中使用 –
更新自己的帖子類型 組織/ XML /薩克斯/ EntityResolver的。 – gks