Hi, I get the following error: error org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException * This occurs when making the call "new org.apache.poi.xssf.usermodel.XSSFWorkbook(getInputStream())." * This happens for all XSLX files. Works fine for XLS files. Fails in WebSphere 6.1, Redhat Linux environment, Java 1.5. Works fine everywhere else, UNIX AIX, Linux with Tomcat, plus all Microsoft environments we've tested. * Confirmed via reflection that the poi jar being accessed is version 3.7. The poi-ooxml, poi-ooxml-schemas, poi-scratchpad in the deployment area are 3.7 as well.
I debugged into the poi code, and found that the exception is being thrown when attempting to parse the theme1.xml member of the XSLX file. public POIXMLDocumentPart createDocumentPart(PackageRelationship rel, PackagePart part) in the XSSF Factory class. try { Class<? extends POIXMLDocumentPart> cls = descriptor.getRelationClass(); Constructor<? extends POIXMLDocumentPart> constructor = cls.getDeclaredConstructor(PackagePart.class, PackageRelationship.class); return constructor.newInstance(part, rel); } catch (Exception e){ throw new POIXMLException(e); } The constructor.newInstance methods throws an exception InvocationTargetException with the cause NoClassDefFoundError. Unfortunately, the error does not mention which class def was not found. I notice that org.openxmlformats.schemas.drawingml.x2006.main.CTColorScheme; org.openxmlformats.schemas.drawingml.x2006.main.ThemeDocument; and org.openxmlformats.schemas.drawingml.x2006.main.CTColor; are imports that, while present in the poi-3.7 ooxml -schemas jar, perhaps are not being found because of some interaction with Websphere? This is just a guess, but I'm stumped, and I did notice several posts that mentioned problems with Websphere 6.1 and finding various openxmlformats classes. Any help on this would be greatly appreciated. Thanks. -- View this message in context: http://apache-poi.1045710.n5.nabble.com/Error-in-POI-running-in-Websphere-6-1-class-constructor-throws-exception-noClassDefFound-tp4740047p4740047.html Sent from the POI - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org