https://issues.apache.org/bugzilla/show_bug.cgi?id=44542





--- Comment #8 from Yegor Kozlov <[EMAIL PROTECTED]>  2008-03-06 07:15:39 PST 
---
1. I can't reproduce it either. I created a test based on the attached code and
it produces correct XLS files.

What is strange to me is that the generated XLS is just data. There are no rich
text, formulas, graphics, any of advanced XLS/POI features, etc. 
I can't see why POI would produce wrong output. 

2. If I try to read any of the problem files in POI I get the same exception:

Exception in thread "main" org.apache.poi.hssf.record.RecordFormatException:
Unable to construct record instance
        at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:204)
        at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:122)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:204)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:256)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:237)
        at org.apache.poi.hssf.scratchpad.Test44542.main(Test44542.java:47)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.intellij.rt.execution.application.AppMain.main(Unknown Source)
Caused by: 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:494)
        at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:192)
        ... 10 more
Caused by: java.lang.NegativeArraySizeException
        at
java.lang.AbstractStringBuilder.<init>(AbstractStringBuilder.java:44)
        at java.lang.StringBuffer.<init>(StringBuffer.java:92)
        at
org.apache.poi.hssf.record.UnicodeString.fillFields(UnicodeString.java:225)
        at
org.apache.poi.hssf.record.UnicodeString.<init>(UnicodeString.java:115)
        at
org.apache.poi.hssf.record.SSTDeserializer.manufactureStrings(SSTDeserializer.java:49)
        at org.apache.poi.hssf.record.SSTRecord.fillFields(SSTRecord.java:364)
        at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
        at org.apache.poi.hssf.record.SSTRecord.<init>(SSTRecord.java:101)
        ... 15 more


So, if it is a POI bug it might be related to SSTRecord. 

Yegor


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to