我得到JIRA插件本trece了Apache POI:我把這些XML-apis.jar,STAX-apis.jar和xercesImpl.jar怎麼辦:我POM,XML
下面是與Apache所致POI 3.9:
Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.apache.poi.xssf.usermodel.XSSFWorkbook]:
Constructor threw exception; nested exception is java.lang.NoSuchMethodError:
javax.xml.stream.XMLEventFactory.newFactory()Ljavax/xml/stream/XMLEventFactory; at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115) at
Caused by: java.lang.NoSuchMethodError: javax.xml.stream.XMLEventFactory.newFactory()Ljavax/xml/stream/XMLEventFactory; at org.apache.poi.openxml4j.opc.internal.marshallers.PackagePropertiesMarshaller
我看着這個FAQ Apache的POI http://poi.apache.org/faq.html#faq-N1017E
如何把這些XML-apis.jar,STAX-apis.jar或xercesImpl.jar:我POM,XML的依賴。
你想添加依賴項還是排除它們? – Victor
是的,我想將它們添加到依賴關係 –
爲什麼你使用這樣一箇舊版本的Apache POI?爲什麼不使用最新的? (目前3.12) – Gagravarr