https://issues.apache.org/bugzilla/show_bug.cgi?id=46235
Summary: Unable to construct record instance
Product: POI
Version: 3.1
Platform: PC
OS/Version: Windows Server 2003
Status: NEW
Severity: major
Priority: P2
Component: HSSF
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
Hello,
with the version 3.1.0 of POI I can do this code :
ByteArrayInputStream instream_ = null;
POIFSFileSystem fs = null;
POIManagerFactory managerFactory = null;
try {
workbook = null;
instream_ = new ByteArrayInputStream(_byteFile);
fs = new POIFSFileSystem(instream_);
workbook = new HSSFWorkbook(fs);
instream_.close();
instream_ = null;
fs = null;
} catch (Exception e) {
throw new SystemException(e.getMessage(), e);
}
However, when I want to open the attachment file, exception occurred,
other file is possible .
workbook = new HSSFWorkbook(fs);
// Exception with 3.1 no probleme with 2.5
I use for POI 3.1 :
poi-3.1-FINAL-20080629.jar
poi-contrib-3.1-FINAL-20080629.jar
poi-scratchpad-3.1-FINAL-20080629.jar
The Exception is :
Caused by: org.apache.poi.hssf.record.RecordFormatException: Unable to
construct record instance
at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:208)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:126)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:246)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:169)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:151)
at
jp.co.nttdata_chugoku.sprist.scm.common.comservice.POIManagerImpl.getHSSFWorkbook(POIManagerImpl.java:53)
at
jp.co.nttdata_chugoku.sprist.scm.common.comservice.MakeExcelCom.<init>(MakeExcelCom.java:150)
... 59 more
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:274)
at
org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:196)
... 65 more
Caused by: org.apache.poi.hssf.record.RecordFormatException: Expected continue
record.
at org.apache.poi.hssf.record.UnicodeString.fillFields(UnicodeString.java:236)
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)
NB : the file that I open is on my station.
Sincerely
--
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]