3

I get the error:

java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg/apache/xmlbeans/XmlOptions;
at org.apache.poi.POIXMLDocumentPart.<clinit>(POIXMLDocumentPart.java:56)

from the line 56:

public static Workbook wb = new XSSFWorkbook();

I just had to re-link my library, but all i did was move all the files and reset the build path to where i moved the files to, and removed the old one.

Nick
  • 85
  • 2
  • 5
  • 11

1 Answers1

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

This statement says that you have mismatch(incompatible) of jars. Make sure you have supported version of jars.

kosa
  • 65,990
  • 13
  • 130
  • 167
  • i grabbed everything new and relinked all the libraries and i get the same error. What do i do now? – Nick Jun 26 '12 at 20:16
  • Check again - you probably have two copies of the xmlbeans jar on your classpath, one of which is too old – Gagravarr Jun 26 '12 at 23:12
  • 1
    @Thinksteep ha yes! i was using the version of xmlbeans that came with the apache poi which was version 2.3.0. downloaded and installed 2.5.0 and it works perfectly. thanks for the help! i didnt realize the version that came with it wasn't the most up to date. – Nick Jun 27 '12 at 16:15