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 2009/04/15 12:02:06 UTC

DO NOT REPLY [Bug 47034] New: RecordFormatException when open an Excel file

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

           Summary: RecordFormatException when open an Excel file
           Product: POI
           Version: 3.5-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: matthew.knl@gmail.com


Created an attachment (id=23494)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23494)
problem.xls

Please check the attached Excel file, it throws "RecordFormatException: Unable
to construct record instance" when open it by following codes.
--
FileInputStream is = new FileInputStream("problem.xls")
POIFSFileSystem poifs = new POIFSFileSystem(is);
return new HSSFWorkbook(poifs);
--
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record
instance
    at
org.apache.poi.hssf.record.RecordFactory$ReflectionRecordCreator.create(RecordFactory.java:71)
    at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:254)
    at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:373)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:277)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:202)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:184)

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


DO NOT REPLY [Bug 47034] RecordFormatException when open an Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47034





--- Comment #7 from Josh Micich <jo...@gildedtree.com>  2009-04-16 13:06:57 PST ---
svn r765163 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=765163 ).

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


DO NOT REPLY [Bug 47034] RecordFormatException when open an Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47034


Nick Burch <ni...@torchbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED




--- Comment #5 from Nick Burch <ni...@torchbox.com>  2009-04-15 05:42:36 PST ---
Fixed in svn (was a signed vs unsigned issue reading in very long strings)

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


DO NOT REPLY [Bug 47034] RecordFormatException when open an Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47034





--- Comment #4 from Matthew <ma...@gmail.com>  2009-04-15 03:42:21 PST ---
org.apache.poi.hssf.record.RecordFormatException: Unable to construct record
instance
    at
org.apache.poi.hssf.record.RecordFactory$ReflectionRecordCreator.create(RecordFactory.java:71)
    at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:254)
    at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:373)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:277)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:202)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:184)
    at com.dttn.excel.helper.ExcelFactory.readExcel03(ExcelFactory.java:116)
    at com.dttn.excel.helper.ExcelFactory.readExcel03(ExcelFactory.java:86)
    at com.dttn.excel.helper.ExcelFactory.read(ExcelFactory.java:33)
    at
com.dttn.excel.generator.module.ExcelEnveloperModule.actionPerformed(ExcelEnveloperModule.java:112)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6134)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5899)
    at java.awt.Container.processEvent(Container.java:2023)
    at java.awt.Component.dispatchEventImpl(Component.java:4501)
    at java.awt.Container.dispatchEventImpl(Container.java:2081)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
    at java.awt.Container.dispatchEventImpl(Container.java:2067)
    at java.awt.Window.dispatchEventImpl(Window.java:2458)
    at java.awt.Component.dispatchEvent(Component.java:4331)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.NegativeArraySizeException
    at
org.apache.poi.util.StringUtil.readCompressedUnicode(StringUtil.java:119)
    at org.apache.poi.hssf.record.NameRecord.<init>(NameRecord.java:436)
    at sun.reflect.GeneratedConstructorAccessor5.newInstance(Unknown Source)
    at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at
org.apache.poi.hssf.record.RecordFactory$ReflectionRecordCreator.create(RecordFactory.java:63)
    ... 34 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: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


DO NOT REPLY [Bug 47034] RecordFormatException when open an Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47034


Nick Burch <ni...@torchbox.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




--- Comment #1 from Nick Burch <ni...@torchbox.com>  2009-04-15 03:09:02 PST ---
Could you please post the full stacktrace, so we can see which record can't be
created? Also, can you please confirm which build of 3.5 you're using?

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


DO NOT REPLY [Bug 47034] RecordFormatException when open an Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47034





--- Comment #6 from Josh Micich <jo...@gildedtree.com>  2009-04-16 13:06:17 PST ---
svn r76516 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=76516 )

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


DO NOT REPLY [Bug 47034] RecordFormatException when open an Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47034





--- Comment #2 from Matthew <ma...@gmail.com>  2009-04-15 03:22:24 PST ---
I am using the POI latest development version (checkout from SVN today)
The full stacktrace under the namespace "org.apache.poi" is pasted in previous
post.

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


DO NOT REPLY [Bug 47034] RecordFormatException when open an Excel file

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47034





--- Comment #3 from Nick Burch <ni...@torchbox.com>  2009-04-15 03:39:42 PST ---
Please check further down your stacktrace, you'll see there the details of the
record that couldn't be constructed

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