在TomCat上运行的POI导致加载程序约束违规

我正在尝试使用Apache POI生成XSLX,但在尝试运行TomCat应用程序时出现此错误:


HTTP Status 500 - javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving interface method "org.openxmlformats.schemas.officeDocument.x2006.extendedProperties.PropertiesDocument.copy()Lorg/apache/xmlbeans/XmlObject;" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/apache/poi/POIXMLProperties, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, org/openxmlformats/schemas/officeDocument/x2006/extendedProperties/PropertiesDocument, have different Class objects for the type ts.schemas.officeDocument.x2006.extendedProperties.PropertiesDocument.copy()Lorg/apache/xmlbeans/XmlObject; used in the signature 

我正在使用POI 3.15。 POI JARs存储在通用的Tomcat7 / lib文件夹中。 (poi-3.15.jar,poi-ooxml-3.15.jar,po-ooxml-schemas-3.15.jar,xmlbeans-2.6.0.jar)


任何人都可以帮我解释什么是冲突在这里,以及如何解决它?

在WEB-INF库中,我放了几乎所有相关的JAR文件。 看来xmlbeans(可能还有更多的)随后与WAR一起导致了冲突。

但是当清理所以我只有在WEB-INF / lib中有poi-3.15.jar和poi-ooxml-3.15.jar时,我得到了Eclise IDE和TomCat运行时都工作的情况。