You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by thomas908 <an...@hcl.in> on 2007/07/12 11:29:51 UTC

POI invocation target exception

Is anyone aware of InvocationTargetException in POI (being used for reading
excel sheets).It is a very strange problem.
I have a swing based application which is reading excel sheets. Using this
application an excel sheet is selected and processed. After teh same excel
sheet is selected and processed a few times, it starts giving
InvocationTargetException. If I copy the content from excel sheet and put it
into another exel sheet and use that sheet, the problem disappears. It again
comes after that excel sheet is processed a few times.
The exception is thrown in the part of code which creates a workbook.

Here is the exception

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:274)

      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:163)

      at
org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:130)

      at com.hcl.ProcessMetadata.readExcel(ProcessMetadata.java:401)

      at com.hcl.ProcessMetadata.process(ProcessMetadata.java:77)

      at com.hcl.ApplyMetadata$1.construct(ApplyMetadata.java:313)

      at com.hcl.SwingWorker$2.run(SwingWorker.java:108)

      at java.lang.Thread.run(Thread.java:534)

Caused by: java.lang.ArrayIndexOutOfBoundsException

      at java.lang.System.arraycopy(Native Method)

      at
org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)

      at
org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)

      at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)

      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.ObjRecord.<init>(ObjRecord.java:61)

      ... 13 more

-- 
View this message in context: http://www.nabble.com/POI-invocation-target--exception-tf4066971.html#a11556410
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org