https://issues.apache.org/bugzilla/show_bug.cgi?id=56564
Bug ID: 56564
Summary: RecordFormatException: Unknown encryption info 4
Product: POI
Version: 3.10
Hardware: PC
Status: NEW
Severity: blocker
Priority: P2
Component: HSSF
Assignee: [email protected]
Reporter: [email protected]
Using poi-3.10-FINAL
When trying to create an instance of HSSFWorkbook, either from a
POIFSFileSystem or FileInputStream I get this error sometimes.
In my experience this has only occured for .xls files which is encrypted with
the option "Protect Workbook Structure".
I've experience that this happens all the time when doing following:
1 ) Open an existing .xls file, or create a new one, either encrypted with
"Protect Workbook Structure".
2 ) Save the file as a new file with different name.
3 ) Save the file again as new file with different name. (For every file you
does this with, will cause an error as shown below)
Be aware if you reopen the file from step 3, and saves as a new file with
different name, this file will not cause an error.
Hope it is understandable.
Stacktrace:
org.apache.poi.hssf.record.RecordFormatException: Unknown encryption info 4
at org.apache.poi.hssf.record.FilePassRecord.<init>(FilePassRecord.java:70)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at
org.apache.poi.hssf.record.RecordFactory$ReflectionConstructorRecordCreator.create(RecordFactory.java:87)
at
org.apache.poi.hssf.record.RecordFactory.createSingleRecord(RecordFactory.java:338)
at
org.apache.poi.hssf.record.RecordFactoryInputStream$StreamEncryptionInfo.<init>(RecordFactoryInputStream.java:65)
at
org.apache.poi.hssf.record.RecordFactoryInputStream.<init>(RecordFactoryInputStream.java:182)
at
org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:477)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:301)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:264)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:199)
at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:181)
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]