Bug 48572

Summary: ClassNotFoundException: Missing class in poi-ooxml-schemas-3.6-20091214.jar
Product: POI Reporter: Bernhard <bernhard.sww>
Component: XSSFAssignee: POI Developers List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 3.6-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Attachments: The affacted excel file

Description Bernhard 2010-01-19 07:17:31 UTC
When modifing an existing Excel file I always get the following error when saving it:

java.lang.ClassNotFoundException: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs$1
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
        at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs.<clinit>(Unknown Source)
        at org.openxmlformats.schemas.spreadsheetml.x2006.main.CTDxfs$Factory.newInstance(Unknown Source)
        at org.apache.poi.xssf.model.StylesTable.writeTo(StylesTable.java:362)
        at org.apache.poi.xssf.model.StylesTable.commit(StylesTable.java:377)
        at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:177)
        at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:181)
        at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:214)

It seems that the File org/openxmlformats/schemas/spreadsheetml/x2006/main/CTDxfs$1 is missing in the distribution of poi-ooxml-schemas-3.6-20091214.jar


Workaround:
Use ooxml-schemas-1.0.jar instead of poi-ooxml-schemas-3.6-20091214.jar
Comment 1 Yegor Kozlov 2010-01-20 23:02:39 UTC
Can you attach a sample .xlsx file that fires the exception? 

It looks like not all anonymous classes defined in CTDxfs are copied into poi-ooxml-schemas. A test file will be very helpful. 

Yegor
Comment 2 Bernhard 2010-01-21 01:41:14 UTC
Created attachment 24874 [details]
The affacted excel file
Comment 3 Bernhard 2010-01-21 01:42:37 UTC
The file has been created with Excel 2003 and converted to xlsx using Excel 2007.
Comment 4 Yegor Kozlov 2010-01-24 05:15:22 UTC
Should be fixed in r902563

I improved the procedure that generates poi-ooxml-schemas to always copy all declared inner classes and interfaces, it should prevent such errors in future. 

Yegor
Comment 5 Yegor Kozlov 2010-03-15 06:42:22 UTC
The problem was fixed in r902563 in Jan 2010.
Please try the latest build from trunk.

Nightly builds can be downloaded from http://encore.torchbox.com/poi-cvs-build/

Yegor