You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2003/02/03 14:11:28 UTC
DO NOT REPLY [Bug 16700] New: -
Failure creating HSSFWorkbook : file uploaded from client : size more than 64.5 kb
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16700>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16700
Failure creating HSSFWorkbook : file uploaded from client : size more than 64.5 kb
Summary: Failure creating HSSFWorkbook : file uploaded from
client : size more than 64.5 kb
Product: POI
Version: 1.5
Platform: Other
OS/Version: Windows NT/2K
Status: UNCONFIRMED
Severity: Blocker
Priority: Other
Component: HSSF
AssignedTo: poi-dev@jakarta.apache.org
ReportedBy: vinit_kl@yahoo.com
I submit the excel file from the client using IE Explorer 5.5 by the code given
below:
<form action="http://xxx/POIExample" method="post" enctype="multipart/form-
data">
<input size="70" type="file" name="spreadsheet" />
<input type="submit" value="Upload File" />
</form>
In the servlet (running in Weblogic 6.1) I remove the extra data which comes in
the HttpServletRequest and have the extract (only the content of the file) in
the String "file":
Then I use the following code to create the workbook
//the parse method returns the content of the excel file which was uploaded
1. String file = parse(req.getInputStream(),req.getContentLength
(),req.getContentType());
//this line creates the ByteArrayInputStream
2. ByteArrayInputStream is = new ByteArrayInputStream(file.getBytes());
//then try to create the workbook
3. HSSFWorkbook wb = new HSSFWorkbook(is);
If i upload the excel file from the client which is less than 64.5 kb, the
HSSFWorkbook gets created successfully and I am able to read data.
But if the excel file size is greater than 64.5 kb it throws an error
java.io.IOException: block[ 63 ] already removed
at org.apache.poi.poifs.storage.BlockListImpl.remove
(BlockListImpl.java:133)
at org.apache.poi.poifs.storage.BlockAllocationTableReader.fetchBlocks
(BlockAllocationTableReader.java:227)
at org.apache.poi.poifs.storage.BlockListImpl.fetchBlocks
(BlockListImpl.java:165)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.processProperties
(POIFSFileSystem.java:441)
at org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>
(POIFSFileSystem.java:139)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>
(HSSFWorkbook.java:175)
at lehman.brokerlink.servlets.POIExample.doProcess(POIExample.java:88)
at lehman.brokerlink.servlets.POIExample.doPost(POIExample.java:26)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Please note: If I try reading/creating the HSSFWorkbook from a java client by
reading the same excel file (for which it was earlier throwing error), it does
not throw any errors.