Return-Path: Delivered-To: apmail-jakarta-poi-user-archive@www.apache.org Received: (qmail 13231 invoked from network); 9 Mar 2006 22:08:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 9 Mar 2006 22:08:41 -0000 Received: (qmail 89741 invoked by uid 500); 9 Mar 2006 22:08:39 -0000 Delivered-To: apmail-jakarta-poi-user-archive@jakarta.apache.org Received: (qmail 89726 invoked by uid 500); 9 Mar 2006 22:08:39 -0000 Mailing-List: contact poi-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "POI Users List" Reply-To: "POI Users List" Delivered-To: mailing list poi-user@jakarta.apache.org Received: (qmail 89714 invoked by uid 99); 9 Mar 2006 22:08:39 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 14:08:39 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [12.22.58.18] (HELO mail.dicarta.com) (12.22.58.18) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Mar 2006 14:08:38 -0800 Received: from corpx.corp.dicarta.com (corpx.dicarta.com [10.1.8.35]) by mail.dicarta.com with ESMTP id k29M8Bs07718 for ; Thu, 9 Mar 2006 14:08:12 -0800 (PST) From: jwang@dicarta.com X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: HSSF - Exception thrown when processing Outlook export Date: Thu, 9 Mar 2006 14:08:17 -0800 Message-ID: <9778DA4F3D53D04B9AE80AC64AC073A30573EFBD@corpx.dicarta.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: HSSF - Exception thrown when processing Outlook export Thread-Index: AcZDvy2MtD+BUTGoTVqszhCs+PUKigABl2bQ To: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Can you catch this exception and then printout the contents of exception.getCause()? That'll tell you what was the target of the "new" instance that java thinks it's trying to call and what happened. >From the javadocs of java.lang.reflect.Constructor.newInstance: InvocationTargetException - if the underlying constructor throws an exception. Jeff Wang diCarta, Inc. -----Original Message----- From: Nick Heudecker [mailto:nheudecker@gmail.com]=20 Sent: Thursday, March 09, 2006 1:19 PM To: poi-user@jakarta.apache.org Subject: HSSF - Exception thrown when processing Outlook export I'm encountering the following exception when I upload an Excel spreadsheet created by Outlook: 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:237) at org.apache.poi.hssf.record.RecordFactory.createRecords( RecordFactory.java :160) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java :183) at org.apache.poi.hssf.usermodel.HSSFWorkbook.(HSSFWorkbook.java :230) at org.apache.poi.hssf.usermodel.HSSFWorkbook .(HSSFWorkbook.java :211) at example.service.impl.ContactServiceImpl.uploadContacts( ContactServiceImpl.java:137) // WEB STACK OMITTED Caused by: java.lang.ArrayIndexOutOfBoundsException: 11 at org.apache.poi.util.LittleEndian.getNumber(LittleEndian.java:491) at org.apache.poi.util.LittleEndian.getInt(LittleEndian.java:139) at org.apache.poi.hssf.record.BOFRecord.fillFields(BOFRecord.java:133) at org.apache.poi.hssf.record.Record.fillFields(Record.java:90) at org.apache.poi.hssf.record.Record.(Record.java:55) at org.apache.poi.hssf.record.BOFRecord.(BOFRecord.java:98) ... 48 more I don't seem to have this problem if I open the spreadsheet and save it before uploading. However, it dies if I try to process the file straight from Outlook. I save the entire file to a temp location before trying to process it. I realize this is a little off the wall, but any help would be appreciated. Worst case, I'll fall back to CSV format. --------------------------------------------------------------------- To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta Poi Project: http://jakarta.apache.org/poi/