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 2008/04/01 23:21:51 UTC

DO NOT REPLY [Bug 44732] New: ClassCastException with new HSSFWorkbook(is)

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

           Summary: ClassCastException with new HSSFWorkbook(is)
           Product: POI
           Version: 3.0
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: tuure.laurinolli@indagon.com


Created an attachment (id=21756)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21756)
Test program

The attached test program when run against the attached test file throws
ClassCastException.

Steps to reproduce:
- Run attached test program with attached test file

Actual result:
- Program crashes with the following stack trace:
Stack trace:
java -cp lib/poi-3.0.2-FINAL-20080204.jar:. MinimalTest
Exception in thread "main" java.lang.ClassCastException:
org.apache.poi.hpsf.PropertySet cannot be cast to
org.apache.poi.hpsf.DocumentSummaryInformation
        at org.apache.poi.POIDocument.readProperties(POIDocument.java:74)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:171)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:259)
        at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:240)
        at MinimalTest.main(MinimalTest.java:7)

Expected result:
- The program should exit succesfully

Exact POI version:
poi-3.0.2-FINAL-20080204.jar


-- 
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 44732] ClassCastException with new HSSFWorkbook(is)

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


Josh Micich <jo...@gildedtree.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME




--- Comment #3 from Josh Micich <jo...@gildedtree.com>  2008-04-01 18:36:15 PST ---
The sample code + spreadsheet work OK in the latest svn trunk.

POIDocument.java must have changed since 3.0.2.  Line 74 does not seem to
correspond to the supplied stack trace.

If you find the same problem on the latest trunk, please re-open this bug.


-- 
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 44732] ClassCastException with new HSSFWorkbook(is)

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





--- Comment #1 from Tuure Laurinolli <tu...@indagon.com>  2008-04-01 14:22:58 PST ---
Created an attachment (id=21757)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=21757)
Test data


-- 
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 44732] ClassCastException with new HSSFWorkbook(is)

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





--- Comment #2 from Tuure Laurinolli <tu...@indagon.com>  2008-04-01 14:26:44 PST ---
Additional information:
- The test data is saved with a Debian OpenOffice.org 2.0.4.9 from Debian 
- If the test data is opened with OO.o 2.2.1 for Windows and resaved, POI can
open it

Is it just a broken file that OO.o can cope with for some reason? Even in that
case ClassCastException is a bit rough :)


-- 
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 44732] ClassCastException with new HSSFWorkbook(is)

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





--- Comment #4 from Tuure Laurinolli <tu...@indagon.com>  2008-04-02 01:42:04 PST ---
Hm yes, appparently some kind of fix for this was applied to trunk in r620582.


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