java.lang.RuntimeException: Unexpected record type (org.apache.poi.hssf.record.HyperlinkRecord) at com.dclear.cmn.core.parser.reader.xls.XlsLineReader.<init>(XlsLineReader.java:86) at com.dclear.cmn.core.parser.reader.XlsDataReader.setFileDetails(XlsDataReader.java:42) at com.dclear.cmn.core.parser.config.ConfigFileReader.configureFeedIterator(ConfigFileReader.java:135) at com.dclear.cmn.core.parser.config.ConfigFileReader.getFeedIterator(ConfigFileReader.java:116) at com.dclear.cmn.core.parser.GenericFeedReader.createDataProcessor(GenericFeedReader.java:53) at com.dclear.cmn.core.parser.GenericFeedReader.getFeedIterator(GenericFeedReader.java:48) at com.dclear.udl.core.task.ParserTask.run(ParserTask.java:139) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.RuntimeException: Unexpected record type (org.apache.poi.hssf.record.HyperlinkRecord) at org.apache.poi.hssf.record.aggregates.RowRecordsAggregate.<init>(RowRecordsAggregate.java:97) at org.apache.poi.hssf.model.InternalSheet.<init>(InternalSheet.java:217) at org.apache.poi.hssf.model.InternalSheet.createSheet(InternalSheet.java:156) at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:354) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:124) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:279) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:250) at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:229) at com.dclear.cmn.core.parser.reader.xls.XlsLineReader.<init>(XlsLineReader.java:72) ... 7 more
Hi All, I am also currently facing above issue. The code changes that we are planning to do 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, Anand Mahajan
https://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java?revision=1748897&view=markup#l72
Created attachment 34084 [details] passing unit test I was unable to reproduce this problem in the latest trunk build (almost 3.15 beta 3).
Please retest in the lastest version of POI (3.15 beta 3 when it comes out) and reopen this bug if you are still having issues with the referenced file.
My unit test also passes for 3.13. Could you please submit a unit test demonstrating the problem?
Created attachment 34088 [details] MY_XLS_FILE Dear Javen, Thanks for reply. Exact file attached where error is occur. Please take 29072016.tar.gz attached file and verify it. Thanks and Regards, Anand Mahajan
Some time file have Hyperlink Records.
I was able to reproduce it with attachment 34088 [details] on the latest trunk build. In order to make sure this issue doesn't reoccur, would you be able to generate a file with just a couple rows that demonstrates the same problem for our unit tests? The workbook metadata properties suggests the file was generated by Crystal Decisions (part of Crystal Reports?). When I resave the file in LibreOffice, I am unable to reproduce the problem.
Hi Javen, The file download from public site(exchange) hence Crystal Reports is not with me to cut it. For me too opening and saving file again did not produce the issue. I was using Microsoft excel for saving file. However we wont be able to add manual interruption for every day task hence its creating issue on our side.
(In reply to Anand from comment #9) > For me too opening and saving file again did not produce the issue. I was > using Microsoft excel for saving file. Sounds like a bug in the way that Crystal Reports saves files. Does the Crystal Reports-generated file pass Microsoft's Binary Format Validator? http://www.microsoft.com/en-us/download/details.aspx?id=26794
Closing as WORKSFORME. Please reopen if you can show that POI incorrectly raises an exception on a valid workbook.