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

--- Comment #4 from [email protected] 2011-02-15 03:09:13 EST ---
Two test files are attached. Both are created in Japanese Excel 2003.

UnicodeStringFailCase1.xls produces the original error. This is the case where
a CONTINUE record appears in ExtRst and split two bytes of a unicode character.

Unicode StringFailCase2.xls produces a slightly different error below. This is
the case where a CONTINUE record appears in PhRun and split two bytes of a
unsigned short value.

Exception in thread "main" org.apache.poi.hssf.record.RecordFormatException:
Unable to construct record instance
       at
org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:65)
       at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:300)
       at
org.apache.poi.hssf.record.RecordFactoryInputStream.readNextRecord(RecordFactoryInputStream.java:270)
       at
org.apache.poi.hssf.record.RecordFactoryInputStream.nextRecord(RecordFactoryInputStream.java:236)
       at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:442)
       at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:263)
       at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:188)
       at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:305)
       at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:286)
       at aflat4.apps.adr.POITest.main(POITest.java:18)

Caused by: org.apache.poi.hssf.record.RecordFormatException: Not enough data
(1) to read requested (2) bytes
       at
org.apache.poi.hssf.record.RecordInputStream.checkRecordPosition(RecordInputStream.java:216)
       at
org.apache.poi.hssf.record.RecordInputStream.readUShort(RecordInputStream.java:267)
       at
org.apache.poi.hssf.record.common.UnicodeString$PhRun.<init>(UnicodeString.java:309)
       at
org.apache.poi.hssf.record.common.UnicodeString$PhRun.<init>(UnicodeString.java:297)
       at
org.apache.poi.hssf.record.common.UnicodeString$ExtRst.<init>(UnicodeString.java:178)
       at
org.apache.poi.hssf.record.common.UnicodeString.<init>(UnicodeString.java:438)
       at
org.apache.poi.hssf.record.SSTDeserializer.manufactureStrings(SSTDeserializer.java:55)
       at org.apache.poi.hssf.record.SSTRecord.<init>(SSTRecord.java:250)
       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$ReflectionConstructorRecordCreator.create(RecordFactory.java:57)
       ... 9 more

-- 
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