Bug 44150 - Unable to read Protected Workbooks
Summary: Unable to read Protected Workbooks
Status: RESOLVED WONTFIX
Alias: None
Product: POI
Classification: Unclassified
Component: HSSF (show other bugs)
Version: 3.0-dev
Hardware: All Windows XP
: P2 major (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-28 02:03 UTC by balamurugan
Modified: 2007-12-28 21:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description balamurugan 2007-12-28 02:03:25 UTC
After protecting the workbook,

I got the following error when I am reading that protected workbook.

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:132)
	at test.CopyOfXLReader1.main(CopyOfXLReader1.java:49)
Caused by: java.lang.IllegalArgumentException: Illegal length
	at org.apache.poi.util.StringUtil.getFromUnicodeHigh(StringUtil.java:76)
	at org.apache.poi.hssf.record.FontRecord.fillFields(FontRecord.java:135)
	at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
	at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
	at org.apache.poi.hssf.record.FontRecord.<init>(FontRecord.java:88)
	... 9 more
Exception in thread "main" org.apache.poi.hssf.record.RecordFormatException:
Unable to construct record instance, the following exception occured: null
	at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:237)
	at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:165)
	at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:132)
	at test.CopyOfXLReader1.main(CopyOfXLReader1.java:49)
Comment 1 Andy Oliver 2007-12-28 21:18:54 UTC
Gosh...this reminds me of something....oh yeah the FAQ.