Thanks for reporting back. We are glad to help. Regards, Dave
On Oct 13, 2010, at 11:49 AM, martijn.list wrote: > I found it. It was my mistake. I called decode() immediately when I > received the DrawingGroupRecord. If I call it at the end of the event > handling it is working. > > Kind regards, > > Martijn > > David Fisher wrote: >> Hi Martijn, >> >> Which version of POI are you using? If you are using POI 3.7beta3, is it >> possible to create a bugzilla with the minimal sample XLS file and code that >> show the error. That will allow a developer to determine what the trouble >> might be. >> >> One thought could be that the image is compressed and the value in >> field_5_cbSave is uncompressed. >> >> How was this file created? Do you know what type of image it its? EMF, PNG, >> GIF? >> >> Regards, >> Dave >> >> On Oct 13, 2010, at 8:18 AM, martijn.list wrote: >> >>> Hi, >>> >>> I get an ArrayIndexOutOfBoundsException when extracting an image from an >>> Excel file. >>> >>> The exception is thrown when handling a DrawingGroupRecord event and >>> calling DrawingGroupRecord#decode() on the DrawingGroupRecord. >>> >>> The exception is thrown because data does is not large enough (i.e., >>> field_5_cbSave is larger than data.length - pos) >>> >>> LINE 93 in EscherMetafileBlip: >>> >>> System.arraycopy( data, pos, raw_pictureData, 0, field_5_cbSave ); >>> >>> Stacktrace: >>> >>> java.lang.ArrayIndexOutOfBoundsException >>> at java.lang.System.arraycopy(Native Method) >>> at >>> org.apache.poi.ddf.EscherMetafileBlip.fillFields(EscherMetafileBlip.java:93) >>> at >>> org.apache.poi.ddf.EscherBSERecord.fillFields(EscherBSERecord.java:79) >>> at >>> org.apache.poi.ddf.EscherContainerRecord.fillFields(EscherContainerRecord.java:53) >>> at >>> org.apache.poi.ddf.EscherContainerRecord.fillFields(EscherContainerRecord.java:53) >>> at >>> org.apache.poi.hssf.record.AbstractEscherHolderRecord.convertToEscherRecords(AbstractEscherHolderRecord.java:82) >>> at >>> org.apache.poi.hssf.record.AbstractEscherHolderRecord.decode(AbstractEscherHolderRecord.java:260) >>> at >>> mitm.common.extractor.impl.office.ExcelPOIExtractor$RecordEventListener.handleDrawingGroupRecord(ExcelPOIExtractor.java:451) >>> at >>> mitm.common.extractor.impl.office.ExcelPOIExtractor$RecordEventListener.processRecord(ExcelPOIExtractor.java:475) >>> at >>> org.apache.poi.hssf.eventusermodel.FormatTrackingHSSFListener.processRecord(FormatTrackingHSSFListener.java:82) >>> at >>> org.apache.poi.hssf.eventusermodel.HSSFRequest.processRecord(HSSFRequest.java:112) >>> at >>> org.apache.poi.hssf.eventusermodel.HSSFEventFactory.genericProcessEvents(HSSFEventFactory.java:147) >>> at >>> org.apache.poi.hssf.eventusermodel.HSSFEventFactory.processEvents(HSSFEventFactory.java:106) >>> >>> Any idea what might be the problem? >>> >>> >>> >>> Kind regards, >>> >>> Martijn >>> >>> PS I'm using trunk >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > > -- > Djigzo open source email encryption > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
