java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg/apache/xmlbeans/XmlOptions;

本秂侑毒 提交于 2019-12-11 03:27:52

问题


I am trying to write a program which write the data in Excel. But i keep getting an error which is shown below:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg/apache/xmlbeans/XmlOptions;
    at org.apache.poi.POIXMLDocumentPart.<clinit>(POIXMLDocumentPart.java:56)
    at wriExcel.main(wriExcel.java:19)

On finding the solutions, I could only find that I should use XMLBeans 2.0 or higher. But, I am using xmlbeans 2.3.0. Is there any other reason for this error.


回答1:


Use xmlbeans-2.6.0.jar which resolves my problem...!




回答2:


This error might be because required needed for the project is not there so you have to download jar and then add that jar to your classpath here is the link

find out which jar you need




回答3:


Use the xmlbeans jar file shipped with PIO libraries, and avoid to download from any other source as there will be jar file conflicts.

You can find the xmlbeans under "ooxml-lib" shipped with PIO.



来源:https://stackoverflow.com/questions/20799326/java-lang-nosuchmethoderror-org-apache-xmlbeans-xmloptions-setsaveaggressivenam

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!