https://issues.apache.org/bugzilla/show_bug.cgi?id=51308
Bug #: 51308
Summary: NoClassErrorFound when parse basic xslx file
Product: POI
Version: 3.7
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: blocker
Priority: P2
Component: XSSF
AssignedTo: [email protected]
ReportedBy: [email protected]
Classification: Unclassified
The xslx is microsoft excel 2007 format, and only have one cell "Hello",
Code 1:
XSSFWorkbook wb = new XSSFWorkbook(new
FileInputStream("hello.xslx"));
XSSFSheet sheet = wb.getSheetAt(0);
System.out.println(sheet.getLastRowNum());
Code 2:
Workbook wb = WorkbookFactory.create(new
FileInputStream("hello.xslx"));
Sheet sheet = wb.getSheetAt(0);
System.out.println(sheet.getLastRowNum());
Error:
Caused by: java.lang.NoClassDefFoundError:
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTOneCellAnchor
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:59)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:120)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:67)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:521)
at
org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1859)
at
org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createTypeStoreUser(SchemaTypeImpl.java:1805)
at org.apache.xmlbeans.impl.store.Xobj.setStableType(Xobj.java:1390)
at org.apache.xmlbeans.impl.store.Cur.setType(Cur.java:2497)
at org.apache.xmlbeans.impl.store.Cur.setType(Cur.java:2482)
at org.apache.xmlbeans.impl.store.Locale.autoTypeDocument(Locale.java:352)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1273)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1257)
at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
at
org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTDrawing$Factory.parse(Unknown
Source)
at org.apache.poi.xssf.usermodel.XSSFDrawing.<init>(XSSFDrawing.java:80)
... 11 more
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]