commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Qingtian Wang" <Qingtian.W...@ualloyalty.com>
Subject RE: poi newbie question
Date Thu, 08 Jul 2004 00:21:23 GMT
Thanks, Martin.



> -----Original Message-----
> From: Martin Cooper [mailto:martinc@apache.org] 
> Sent: Wednesday, July 07, 2004 6:55 PM
> To: Jakarta Commons Users List
> Subject: Re: poi newbie question
> 
> 
> 
> 
> On Wed, 7 Jul 2004, 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?
> 
> You're likely to get much better answers to POI questions if 
> you ask them 
> on the POI mailing list. See:
> 
> http://jakarta.apache.org/site/mail2.html#poi
> 
> --
> Martin Cooper
> 
> 
> >
> > Thanks very much,
> > Q. Wang
> >
> >
> > ~~~~~~~
> >
> > <Jul 7, 2004 5:27:59 PM CDT> <Warning> <HTTP> <BEA-101138>

> > 
> <ServletContext(id=9039851,name=telescope,context-path=/telesc
> ope) 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(NativeCo
> nstructorAccessorImpl.java:39)
> >        at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Dele
gatingConstructorAccessorImpl.java:27)
> >        at 
> java.lang.reflect.Constructor.newInstance(Constructor.java:274)
> >        at 
> org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFa
> ctory.java:224)
> >        at 
> org.apache.poi.hssf.record.RecordFactory.createRecords(RecordF
> actory.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$ServletInvocationAct
> ion.run(ServletStubImpl.java:971)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:402)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:446)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:305)
> >        at 
> weblogic.servlet.internal.RequestDispatcherImpl.forward(Reques
> tDispatcherImpl.java:301)
> >        at 
> com.united.telescope.prototype.ExcelReader.processRequest(Unkn
> own 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$ServletInvocationAct
> ion.run(ServletStubImpl.java:971)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:402)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:305)
> >        at 
> weblogic.servlet.internal.WebAppServletContext$ServletInvocati
> onAction.run(WebAppServletContext.java:6350)
> >        at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedSubject.java:317)
> >        at 
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:118)
> >        at 
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(W
> ebAppServletContext.java:3635)
> >        at 
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe
> questImpl.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(RecordFa
> ctory.java:237)
> >        at 
> org.apache.poi.hssf.record.RecordFactory.createRecords(RecordF
> actory.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$ServletInvocationAct
> ion.run(ServletStubImpl.java:971)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:402)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:446)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:305)
> >        at 
> weblogic.servlet.internal.RequestDispatcherImpl.forward(Reques
> tDispatcherImpl.java:301)
> >        at 
> com.united.telescope.prototype.ExcelReader.processRequest(Unkn
> own 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$ServletInvocationAct
> ion.run(ServletStubImpl.java:971)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:402)
> >        at 
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(Servle
> tStubImpl.java:305)
> >        at 
> weblogic.servlet.internal.WebAppServletContext$ServletInvocati
> onAction.run(WebAppServletContext.java:6350)
> >        at 
> weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authe
> nticatedSubject.java:317)
> >        at 
> weblogic.security.service.SecurityManager.runAs(SecurityManage
> r.java:118)
> >        at 
> weblogic.servlet.internal.WebAppServletContext.invokeServlet(W
> ebAppServletContext.java:3635)
> >        at 
> weblogic.servlet.internal.ServletRequestImpl.execute(ServletRe
> questImpl.java:2585)
> >        at 
> weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
> >        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
> >
> > ~~~~~~~
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 

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


Mime
View raw message