Bug 53280 - While reading xlsx file in WAS 6.1 it throws org.apache.poi.POIXMLException:java.lang.reflect.InvocationTargetException
Summary: While reading xlsx file in WAS 6.1 it throws org.apache.poi.POIXMLException:j...
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.8-FINAL
Hardware: PC Windows XP
: P2 critical (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-23 14:09 UTC by Ankur
Modified: 2012-05-23 14:17 UTC (History)
0 users



Attachments
Stack Trace for the Exception (17.66 KB, text/plain)
2012-05-23 14:09 UTC, Ankur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ankur 2012-05-23 14:09:08 UTC
Created attachment 28823 [details]
Stack Trace for the Exception

Hi,
While reading a xlsx file using POI3.8 .I am getting an Exception.
org.apache.poi.POIXMLException: java.lang.reflect.InvocationTargetException

The same code woks fine with Tomcat Server but fails with WAS6.1.I am suspecting some library conflict.

Below is my class path.
poi-3.8-20120326.jar
xmlbeans-2.3.0.jar
poi-ooxml-3.8-20120326.jar
poi-excelant-3.8-20120326.jar
stax-api-1.0.1.jar
dom4j-1.6.1.jar
poi-ooxml-schemas-3.8-20120326.jar

Below is the source code 
InputStream iStream=null;
FormBeanExcel ex= (FormBeanExcel)form;
Workbook workbook = null;
Sheet worksheet = null;
try {
iStream = ex.getTestFile().getInputStream();
workbook = WorkbookFactory.create(iStream); //It breaks at this point
} catch (Exception e) {
System.out.println("Eception");
e.printStackTrace();
}


Please Suggest .
Comment 1 Nick Burch 2012-05-23 14:17:50 UTC
If you look a little further down your exception stacktrace, you'll see what's wrong:

Caused by: java.lang.NoClassDefFoundError: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTPhoneticRun

This is covered in the FAQ: http://poi.apache.org/faq.html#faq-N10025

If you're able to provide the unit test needed to have your new part of the schemas included as standard, please re-open the bug and attach the test