Bug 44770 - java.lang.RuntimeException: Couldn't instantiate the class for type with id 1036 on class class org.apache.poi.hslf.record.PPDrawing
Summary: java.lang.RuntimeException: Couldn't instantiate the class for type with id 1...
Status: RESOLVED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: HSLF (show other bugs)
Version: unspecified
Hardware: Sun Solaris
: P1 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
: 44723 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-04-07 12:30 UTC by Durga Deep Tirunagari
Modified: 2009-09-06 04:36 UTC (History)
1 user (show)



Attachments
This powerPoint attachment causes this error. (444.50 KB, application/vnd.ms-powerpoint)
2008-04-07 12:30 UTC, Durga Deep Tirunagari
Details
This attachment contains comments (8.50 KB, application/vnd.ms-powerpoint)
2009-08-24 04:12 UTC, Gitu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Durga Deep Tirunagari 2008-04-07 12:30:12 UTC
Created attachment 21786 [details]
This powerPoint attachment causes this error.

java.lang.RuntimeException: Couldn't instantiate the class for type with id 1006 on class class org.apache.poi.hslf.record.Slide : java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type with id 1036 on class class org.apache.poi.hslf.record.PPDrawing : java.lang.reflect.InvocationTargetException
Cause was : java.lang.ArrayIndexOutOfBoundsException
        at org.apache.poi.hslf.record.Record.createRecordForType(Record.java:190)
        at org.apache.poi.hslf.record.Record.buildRecordAtOffset(Record.java:105)
        at org.apache.poi.hslf.HSLFSlideShow.read(HSLFSlideShow.java:264)
        at org.apache.poi.hslf.HSLFSlideShow.buildRecords(HSLFSlideShow.java:235)
        at org.apache.poi.hslf.HSLFSlideShow.<init>(HSLFSlideShow.java:145)
        at org.apache.poi.hslf.extractor.PowerPointExtractor.<init>(PowerPointExtractor.java:92)
        at org.apache.poi.hslf.extractor.PowerPointExtractor.<init>(PowerPointExtractor.java:85)
        at 

WARNING: Unable to Index MS PowerPoint Document : Couldn't instantiate the class for type with id 1006 on class class org.apache.poi.hslf.record.Slide : java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type with id 1036 on class class org.apache.poi.hslf.record.PPDrawing : java.lang.reflect.InvocationTargetException
Cause was : java.lang.ArrayIndexOutOfBoundsException
Apr 7, 2008 12:30:17 PM com.sun.comms.iss.indexapi.converter.MSPowerPointConverter getObject
WARNING: Unable to Index MS PowerPoint Document : Couldn't instantiate the class for type with id 1006 on class class org.apache.poi.hslf.record.Slide : java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type with id 1036 on class class org.apache.poi.hslf.record.PPDrawing : java.lang.reflect.InvocationTargetException
Cause was : java.lang.ArrayIndexOutOfBoundsException
Apr 7, 2008 12:30:17 PM
Comment 1 Yegor Kozlov 2008-04-08 07:47:18 UTC
Fixed

Yegor
Comment 2 Yegor Kozlov 2008-04-16 05:42:12 UTC
*** Bug 44723 has been marked as a duplicate of this bug. ***
Comment 3 Gitu 2009-08-03 20:50:19 UTC
Hi there,

I get the following exception when trying to read a ppt document.
The method that throws this exception is :
reader.read(file.getInputStream());

Couldn't instantiate the class for type with id 1006 on class class org.apache.poi.hslf.record.Slide : java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type with id 5000 on class class org.apache.poi.hslf.record.DummyPositionSensitiveRecordWithChildren : java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type with id 5002 on class class org.apache.poi.hslf.record.DummyPositionSensitiveRecordWithChildren : java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type with id 5003 on class class org.apache.poi.hslf.record.DummyPositionSensitiveRecordWithChildren : java.lang.reflect.InvocationTargetException
Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type with id 12000 on class class org.apache.poi.hslf.record.Comment2000 : java.lang.reflect.InvocationTargetException
Cause was : java.lang.IllegalStateException: Third child record wasn't a CString, was of type 12001

I also see a java.lang.RuntimeException for some of the word and ppt documents when we try to open the document using the following line;

POIFSFileSystem poifs = new POIFSFileSystem(is);
Comment 4 Yegor Kozlov 2009-08-08 04:07:38 UTC
Which version of POI are you using? Try the latest trunk, daily builds can be downloaded from http://encore.torchbox.com/poi-svn-build/. If the problem persists, please attach the problem file. Without it we can't do much.

Yegor

(In reply to comment #3)
> Hi there,
> 
> I get the following exception when trying to read a ppt document.
> The method that throws this exception is :
> reader.read(file.getInputStream());
> 
> Couldn't instantiate the class for type with id 1006 on class class
> org.apache.poi.hslf.record.Slide : java.lang.reflect.InvocationTargetException
> Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type
> with id 5000 on class class
> org.apache.poi.hslf.record.DummyPositionSensitiveRecordWithChildren :
> java.lang.reflect.InvocationTargetException
> Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type
> with id 5002 on class class
> org.apache.poi.hslf.record.DummyPositionSensitiveRecordWithChildren :
> java.lang.reflect.InvocationTargetException
> Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type
> with id 5003 on class class
> org.apache.poi.hslf.record.DummyPositionSensitiveRecordWithChildren :
> java.lang.reflect.InvocationTargetException
> Cause was : java.lang.RuntimeException: Couldn't instantiate the class for type
> with id 12000 on class class org.apache.poi.hslf.record.Comment2000 :
> java.lang.reflect.InvocationTargetException
> Cause was : java.lang.IllegalStateException: Third child record wasn't a
> CString, was of type 12001
> 
> I also see a java.lang.RuntimeException for some of the word and ppt documents
> when we try to open the document using the following line;
> 
> POIFSFileSystem poifs = new POIFSFileSystem(is);
Comment 5 Gitu 2009-08-24 04:12:51 UTC
Created attachment 24158 [details]
This attachment contains comments

Hi there,

This issue I face when I try to read a PPT with comments inserted in that.
I am using poi 3.2 and have also tested with beta 3.5 version and the problem still persists.

Thanks,
Gitu
Comment 6 Gitu 2009-08-24 22:11:43 UTC
Changing the status to new!!
Plz see the required info provided by me in the earlier comment...
Comment 7 Yegor Kozlov 2009-09-06 04:36:49 UTC
Fixed in r811814

PPT parser didn't properly handle comment containers (Comment2000) with missing comment text. 

Yegor