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
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
Created attachment 24874 [details] The affacted excel file
The file has been created with Excel 2003 and converted to xlsx using Excel 2007.
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
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