poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48699] New: RecordFormatException: Unexpected remaining size (12)
Date Mon, 08 Feb 2010 13:19:16 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48699

           Summary: RecordFormatException: Unexpected remaining size (12)
           Product: POI
           Version: 3.6
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: mail.metallo.now@gmail.com


Created an attachment (id=24945)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=24945)
the excel

After upgrading from POI 3.2 to 3.6 we get an error while reading an excisting
Excel 2003 and writing an updated version to another file. You can find the
Excel in attachment.

Code:

InputStream inp = new FileInputStream(file);
wb_xls = new HSSFWorkbook(inp);

Tracing:

org.apache.poi.hssf.record.RecordFormatException: Unable to construct record
instance
    at
org.apache.poi.hssf.record.RecordFactory$ReflectionRecordCreator.create(RecordFactory.java:64)
    at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:263)
    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:392)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:276)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:201)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:317)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:298)
    at
be.mc.system.poi.excel.ExcelFromList.makeXLSWorkBook(ExcelFromList.java:387)
    at
be.mc.system.poi.excel.ExcelFromList.generateReport(ExcelFromList.java:170)
    at be.mc.system.poi.excel.ExcelFromList.send(ExcelFromList.java:235)
    at
be.mc.system.scheduler.server.ScheduleExportJob.execute(ScheduleExportJob.java:165)
    at be.ldc.trading.orderheader.export.ExportJob.execute(ExportJob.java:44)
    at org.quartz.core.JobRunShell.run(JobRunShell.java:203)
    at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
Caused by: org.apache.poi.hssf.record.RecordFormatException: Unexpected
remaining size (12)
    at
org.apache.poi.hssf.record.pivottable.ExtendedPivotTableViewFieldsRecord.<init>(ExtendedPivotTableViewFieldsRecord.java:68)
    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$ReflectionRecordCreator.create(RecordFactory.java:56)
    ... 15 more



Checking the file with the BiffViewer gives us the following error:



Offset=0x0020A085(2138245) recno=137008 sid=0x00EC size=0x00AA(170)
[MSODRAWING]
No Escher Records Decoded
[/MSODRAWING]

Offset=0x0020A133(2138419) recno=137009 sid=0x005D size=0x0046(70)
java.lang.NullPointerException
        at
org.apache.poi.hssf.record.LbsDataSubRecord.toString(LbsDataSubRecord
.java:246)
        at org.apache.poi.hssf.record.ObjRecord.toString(ObjRecord.java:146)
        at org.apache.poi.hssf.dev.BiffViewer.createRecords(BiffViewer.java:97)
        at org.apache.poi.hssf.dev.BiffViewer.main(BiffViewer.java:401)

-- 
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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message