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 2015/03/06 09:24:30 UTC

[Bug 57669] New: RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

https://bz.apache.org/bugzilla/show_bug.cgi?id=57669

            Bug ID: 57669
           Summary: RuntimeException: Unexpected record type
                    (org.apache.poi.hssf.record.FeatHdrRecord)
           Product: POI
           Version: 3.10-FINAL
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: HSSF
          Assignee: dev@poi.apache.org
          Reporter: diptesh2007@gmail.com

We received an excel file from an external source and trying to read the file
through POI, we are getting the exception below:

java.lang.RuntimeException: Unexpected record type
(org.apache.poi.hssf.record.FeatHdrRecord)
    at
org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:97)
~[poi-3.10.1.jar:3.10.1]
    at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:166)
~[poi-3.10.1.jar:3.10.1]
    at
org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:121)
~[poi-3.10.1.jar:3.10.1]
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:311)
~[poi-3.10.1.jar:3.10.1]
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:264)
~[poi-3.10.1.jar:3.10.1]
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:199)
~[poi-3.10.1.jar:3.10.1]
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:181)
~[poi-3.10.1.jar:3.10.1]

If the file is opened and saved thereafter, the exception no longer occurs and
the file is processed successfully.

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Diptesh <di...@gmail.com> changed:

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

--- Comment #3 from Diptesh <di...@gmail.com> ---
I have tried with the POI 3.12 beta 1 but getting the same error.
Below is the error stack trace:

java.lang.RuntimeException: Unexpected record type
(org.apache.poi.hssf.record.FeatHdrRecord)
    at
org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:97)
~[poi-3.12-beta1-20150228.jar:3.12-beta1]
    at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:217)
~[poi-3.12-beta1-20150228.jar:3.12-beta1]
    at
org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:156)
~[poi-3.12-beta1-20150228.jar:3.12-beta1]
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:336)
~[poi-3.12-beta1-20150228.jar:3.12-beta1]
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:288)
~[poi-3.12-beta1-20150228.jar:3.12-beta1]
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:223)
~[poi-3.12-beta1-20150228.jar:3.12-beta1]
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:206)
~[poi-3.12-beta1-20150228.jar:3.12-beta1]

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

--- Comment #10 from Deepesh Ramrakhyani <de...@gmail.com> ---
Hi All,

I am also currently facing the same issue. The code changes that we are
planning to do based on the suggestion provided by Diptesh are,

case HyperlinkRecord.sid:
     continue;

The file that we are trying to load which is given the above mentioned is
available at .

https://www.jse.co.za/_layouts/15/DownloadHandler.ashx?FileName=/Safex/mtmdata/All%20Contract%20Details.xls

Please let us know will this fix work and what will be the impact of this
change.

Thanks in Advance.

Regards,
Deepesh Ramrakhyani.

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |52447

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Dominik Stadler <do...@gmx.at> changed:

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

--- Comment #11 from Dominik Stadler <do...@gmx.at> ---
The changes for Bug #52447 should fix the cases with "HyperlinkRecord", for
others we did not receive a test-file and thus cannot work on a fix. 

Please provide a sample-file which triggers this problem in a new bug report so
we can review if there is a way to support more such slightly broken files.

*** This bug has been marked as a duplicate of bug 52447 ***

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

--- Comment #4 from Diptesh <di...@gmail.com> ---
Created attachment 32547
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=32547&action=edit
Problem file

Please look into the line number 7491 and 7492

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

--- Comment #2 from Diptesh <di...@gmail.com> ---
Has the bug been fixed in POI 3.12 beta 1? Do you want us to test the same in
3.12 beta 1?

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

--- Comment #5 from Diptesh <di...@gmail.com> ---
The following problem can be fixed in two ways:

1) Modifying the contstructor in RowRecordsAggregate.java:

//include
case FeatHdrRecord.sid:
     continue;


2) Modifying the isEndOfRowBlock() API of RecordOrderer.java:

//include
case FeatHdrRecord.sid:

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Diptesh <di...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |Windows 7

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57669
Bug 57669 depends on bug 52447, which changed state.

Bug 52447 Summary: Unable to Open Excel XLS with hyperlink cells.
https://bz.apache.org/bugzilla/show_bug.cgi?id=52447

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

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Diptesh <di...@gmail.com> changed:

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

--- Comment #7 from Diptesh <di...@gmail.com> ---
Unfortunately the excel file we received contains confidential information
which is the reason why we cannot upload the problem file.

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Nick Burch <ap...@gagravarr.org> changed:

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

--- Comment #8 from Nick Burch <ap...@gagravarr.org> ---
I'm very reluctant to try to fix this without a test file. With no test file,
it's hard for us to ensure that the fix has worked properly, the correct data
is coming back, and there are no side-effects on that file. With no test file,
it's impossible for us to ensure that the fix remains into the future as the
codebase evolves, and no warning that we might have broken anything

If you, or someone else, could find a file that shows the problem, then we can
use that. Otherwise, perhaps you could talk to whoever generated/gave you the
file, and ask them to make another one without the information in? Or perhaps
take a hex editor to your file you have, and replace the sensitive text in it?

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |50426, 53984

--- Comment #9 from Dominik Stadler <do...@gmx.at> ---
There are a number of similar bugs, all of them happen with files that are not
produced by Excel itself and thus are likely slightly broken. Unfortunately a
simple stable fix is not always possible, especially here when we do not even
have a sample file to work against.

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Nick Burch <ap...@gagravarr.org> changed:

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

--- Comment #6 from Nick Burch <ap...@gagravarr.org> ---
Any chance you could upload a file that shows the problem? We can then use that
in a unit test for the fix

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Diptesh <di...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |Windows 7

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


[Bug 57669] RuntimeException: Unexpected record type (org.apache.poi.hssf.record.FeatHdrRecord)

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

Nick Burch <ap...@gagravarr.org> changed:

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

--- Comment #1 from Nick Burch <ap...@gagravarr.org> ---
Does the problem still occur with POI 3.12 beta 1?

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