Bug 54812

Summary: can't read xlsx File - Error NoSuchMethodError
Product: POI Reporter: stefan.kostrau
Component: POI OverallAssignee: POI Developers List <dev>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P2    
Version: 3.9-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description stefan.kostrau 2013-04-08 09:43:43 UTC
Hi i am Trying to read XLSX file using POI API but an error has been occurred..
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)

I don't know why it happens. I have in my classpath in order this jar files:
xmlbeans-2.3.0.jar
commons-codec-1.5.jar
commons-logging-1.1.jar
dom4j-1.6.1.jar
junit-3.8.1.jar
log4j-1.2.13.jar
poi-3.9-20121203.jar
poi-ooxml-schemas-3.9-20121203.jar
poi-examples-3.9-20121203.jar
poi-excelant-3.9-20121203.jar
poi-ooxml-3.9-20121203.jar
poi-scratchpad-3.9-20121203.jar
stax-api-1.0.1.jar

With Windows XP 32bit i can read ".xls" and ".xlsx". The same under Windows 7 64bit with Office 2007 it works but not with Windows 7 64bit with Office 2010.

The Exception is on the secound line 
InputStream inp     = new FileInputStream("***.xlsx");
Workbook workbook   = WorkbookFactory.create(inp);
Comment 1 stefan.kostrau 2013-04-08 09:45:38 UTC

*** This bug has been marked as a duplicate of bug 54811 ***