Return-Path: Delivered-To: apmail-poi-dev-archive@www.apache.org Received: (qmail 14731 invoked from network); 5 Mar 2008 10:13:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Mar 2008 10:13:18 -0000 Received: (qmail 27082 invoked by uid 500); 5 Mar 2008 10:13:14 -0000 Delivered-To: apmail-poi-dev-archive@poi.apache.org Received: (qmail 26953 invoked by uid 500); 5 Mar 2008 10:13:13 -0000 Mailing-List: contact dev-help@poi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "POI Developers List" Delivered-To: mailing list dev@poi.apache.org Received: (qmail 26944 invoked by uid 99); 5 Mar 2008 10:13:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2008 02:13:13 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2008 10:12:34 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id DF5E7234C089; Wed, 5 Mar 2008 02:12:03 -0800 (PST) From: bugzilla@apache.org To: dev@poi.apache.org Subject: DO NOT REPLY [Bug 44536] New: Error reading a 'read only 'recommended' XLS file X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: newchanged X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: POI X-Bugzilla-Component: HSSF X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: richard.evans@datanomic.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dev@poi.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Wed, 5 Mar 2008 02:12:03 -0800 (PST) X-Virus-Checked: Checked by ClamAV on apache.org https://issues.apache.org/bugzilla/show_bug.cgi?id=3D44536 Summary: Error reading a 'read only 'recommended' XLS file Product: POI Version: 3.0 Platform: PC OS/Version: Windows XP Status: NEW Severity: normal Priority: P2 Component: HSSF AssignedTo: dev@poi.apache.org ReportedBy: richard.evans@datanomic.com This is for version 3.0.2 FINAL. If you open an XLS file and save with the 'read only recommended' option se= t, POI fails to read the file: Exception in thread "main" org.apache.poi.hssf.record.RecordFormatException: Unable to construct record instance at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:19= 9) at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:1= 17) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:207) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:259) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java:240) at rde.tests.poi.XLTest.main(XLTest.java:30) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcce= ssorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstru= ctorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:18= 7) ... 5 more Caused by: java.lang.IllegalArgumentException: Illegal length at org.apache.poi.hssf.record.RecordInputStream.readCompressedUnicode(RecordIn= putStream.java:270) at org.apache.poi.hssf.record.FileSharingRecord.fillFields(FileSharingRecord.j= ava:62) at org.apache.poi.hssf.record.Record.(Record.java:55) at org.apache.poi.hssf.record.FileSharingRecord.(FileSharingRecord.java:= 48) ... 10 more The code to parse the FILESHARING record does not seem to take account of changes from BIFF5 to BIFF8. Here is an extract from the openoffice xls fi= le format document: 0 2 1 =3D Recommend read-only state while loading the file 2 2 Hash value calculated from the read-only password (=E2=9E=9C4.18.4) 4 var. User name of the file creator BIFF2-BIFF5: Byte string, 8-bit string length (=E2=9E=9C2.5.2) BIFF8: Unicode string, 16-bit string length (=E2=9E=9C2.5.3) 170 A trivial XLS file is attached --=20 Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=3De= mail ------- 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