poi-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danny Mui <da...@muibros.com>
Subject Re: poi newbie question
Date Thu, 08 Jul 2004 15:05:20 GMT
Does this happen when you load the workbook directly (not from file upload)?

What version of HSSF are you using?

Qingtian Wang wrote:

> Hi,
> 
> I am using POI to parse Excel files uploaded from a JSP (jdk1.4, j2ee1.3, weblogic8.1).
> 
> At times I can successfully parse the Excel file uploaded, but other times I've got the
following error. I am using commons-fileupload to load the Excel file onto the server; and
since I don't see any exceptions thrown by that package, I guess the problem happens when
I am using POI. (Couldn't figure out why I got the "org.apache.poi.hssf.record.RecordFormatException"
exception.)
> 
> I am using the HSSFWorkbook() constructor that takes an InputStream as the argument.
After getting the workbook, I am pretty much looping over the entire Excel file and printing
out the cell values, similar to the sample code that comes with the POI jar (org.apache.poi.hssf.dev.HSSF.java).
> 
> Can someone please help?
> 
> Thanks very much,
> Q. Wang
> 
> 
> ~~~~~~~
> 
> <Jul 7, 2004 5:27:59 PM CDT> <Warning> <HTTP> <BEA-101138> <ServletContext(id=9039851,name=telescope,context-path=/telescope)
One of the getParameter family of methods called after reading from the ServletInputStream.
Not merging post parameters.> 
> [WARNING] Unknown Ptg 3c (60) java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
>         at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
>         at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
>         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165)
>         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:212)
>         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:193)
>         at com.united.telescope.prototype.Excel.<init>(Unknown Source)
>         at jsp_servlet._test.__exceldisplay._jspService(__exceldisplay.java:136)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
>         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:446)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
>         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:301)
>         at com.united.telescope.prototype.ExcelReader.processRequest(Unknown Source)
>         at com.united.telescope.prototype.ExcelReader.doPost(Unknown Source)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
>         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
>         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
>         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
>         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
>         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> Caused by: java.lang.ArrayIndexOutOfBoundsException
>         at java.lang.System.arraycopy(Native Method)
>         at org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
>         at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
>         at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
>         at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
>         at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
>         at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
>         ... 31 more
> org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance,
the following exception occured: null
>         at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:237)
>         at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
>         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165)
>         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:212)
>         at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:193)
>         at com.united.telescope.prototype.Excel.<init>(Unknown Source)
>         at jsp_servlet._test.__exceldisplay._jspService(__exceldisplay.java:136)
>         at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
>         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:446)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
>         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:301)
>         at com.united.telescope.prototype.ExcelReader.processRequest(Unknown Source)
>         at com.united.telescope.prototype.ExcelReader.doPost(Unknown Source)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
>         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
>         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
>         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
>         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
>         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
>         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> 
> ~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Mime
View raw message