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 2006/05/23 01:22:03 UTC
DO NOT REPLY [Bug 39634] New: - HSSFWorkbook throwing intermittent exception on write()
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39634>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39634
Summary: HSSFWorkbook throwing intermittent exception on write()
Product: POI
Version: 3.0-dev
Platform: Other
OS/Version: other
Status: NEW
Severity: normal
Priority: P2
Component: HSSF
AssignedTo: poi-dev@jakarta.apache.org
ReportedBy: inordinateck@yahoo.com
Here's the stack trace:
java.lang.ArrayIndexOutOfBoundsException: 60
at
org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate.rowHasCells(ValueRecordsAggregate.java:195)
at org.apache.poi.hssf.model.Sheet.getSize(Sheet.java:2112)
at
org.apache.poi.hssf.usermodel.HSSFWorkbook.getBytes(HSSFWorkbook.java:920)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.write(HSSFWorkbook.java:875)
Issue seems to be lines 193-194 in
org.apache.poi.hssf.record.aggregates.ValueRecordsAggregate (SVN 408776):
if (row > records.length)
return false;
Which seems like it should be
if (row >= records.length)
return false;
That's just a quick guess, from a very cursory look at the code.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
DO NOT REPLY [Bug 39634] - HSSFWorkbook throwing intermittent exception on write()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39634>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39634
------- Additional Comments From jheight@apache.org 2006-08-15 01:24 -------
I am very reluctant to apply this patch without further investigation. Can you
provide a sample piece of code or an excel workbook which when written out
displays the error.
I have never come across this, and since i wrote that piece of code would like
to feel confident that it is the problem ;-) (rather than another related piece
of code)
Jason
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
DO NOT REPLY [Bug 39634] - HSSFWorkbook throwing intermittent exception on write()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39634>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39634
------- Additional Comments From inordinateck@yahoo.com 2006-05-22 23:27 -------
Created an attachment (id=18331)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=18331&action=view)
ValueRecordsAggregate.java svn diff
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
DO NOT REPLY [Bug 39634] - HSSFWorkbook throwing intermittent exception on write()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39634>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39634
------- Additional Comments From inordinateck@yahoo.com 2006-08-15 02:44 -------
Your request makes perfect sense, I wish I was prudent enough to include the
test case back when I filed it. I've been running the patched code in
production now for close to three months, and I can't recall exactly what was
causing it. I'll have to do some digging around- I'll get back to you...
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
DO NOT REPLY [Bug 39634] - HSSFWorkbook throwing intermittent exception on write()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39634>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39634
------- Additional Comments From chris@siterra.com 2006-12-12 15:18 -------
Created an attachment (id=19251)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19251&action=view)
Sample Excel Workbook which leads to error when written.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
DO NOT REPLY [Bug 39634] - HSSFWorkbook throwing intermittent exception on write()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39634>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39634
------- Additional Comments From inordinateck@yahoo.com 2006-05-22 23:23 -------
actually, fixing that threw more null pointers. Seems a bit odd, since I've run
this code hundreds of times before with no trouble. In any case, the problems I
ran into after the first fix all had to do with the MyIterator inner class in
the same ValueRecordsAggregator class. I'll attach a diff that seems to have
resolved the problem.
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
DO NOT REPLY [Bug 39634] - HSSFWorkbook throwing intermittent exception on write()
Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=39634>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39634
------- Additional Comments From chris@siterra.com 2006-12-12 15:15 -------
I also have this problem. The patch from CK seems to correct it. Thanks.
I'll attach an excel workbook which when written leads to the error. I used the
sample code below for testing.
Chris
import java.io.*;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
public class ExcelTest
{
public static void main(String[] args) throws Exception
{
InputStream inputStream = new FileInputStream(new File(args[0]));
OutputStream outputStream = new FileOutputStream(new File(args[1]));
POIFSFileSystem fileSystem = new POIFSFileSystem(inputStream);
HSSFWorkbook workbook = new HSSFWorkbook(fileSystem);
workbook.write(outputStream);
}
}
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
Mailing List: http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta POI Project: http://jakarta.apache.org/poi/