Exception while running provided HelloWorld

Hi There,

I am exploring Aspose.Slides for use in a project to automate the generation of pptx files. Currently I am trying to just get the initial examples up and running, but I am encountering an exception, different ones while running 3.0.0 or 2.9.6.

First I would like to note that there are several mistakes in the HelloWorld Example (How to create Hello World Presentation document|Aspose.Slides Documentation).

line 5

SlideEx sld = pres.getSlides().get_item(0);

Should be

SlideEx sld = pres.getSlides().get_Item(0);

Line 16

ashp.getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getFillFormat().setSolidFillColor.Color(Color.black);

Could not find an equivalent

Line 19

ashp.getShapeStyle().getLineColor().settColor(Java.awt.Color.white);

Should be

ashp.getShapeStyle().getLineColor().setColor(java.awt.Color.white);

Line 5 and 19 are rather trivial, but though I would note these so you could update them.

With line 16 commented out I compile using 3.0.0 successfully, but when I run I get the following error.

Exception in thread “main” java.lang.IllegalStateException: Cannot find resource ‘/Aspose/Resources/GenBasR.ttf’.

at com.aspose.slides.a.B.if(Unknown Source)

at com.aspose.slides.a.h.r.do(Unknown Source)

at com.aspose.slides.a.l.h.char(Unknown Source)

at com.aspose.slides.a.l.h.byte(Unknown Source)

at com.aspose.slides.a.l.h.do(Unknown Source)

at com.aspose.slides.a.l.j.do(Unknown Source)

at com.aspose.slides.a.l.j.do(Unknown Source)

at com.aspose.slides.a.l.j.do(Unknown Source)

at com.aspose.slides.lU.(Unknown Source)

at com.aspose.slides.GU.int(Unknown Source)

at com.aspose.slides.GU.final(Unknown Source)

at com.aspose.slides.co.do(Unknown Source)

at com.aspose.slides.SlideEx.do(Unknown Source)

at com.aspose.slides.SlideEx.do(Unknown Source)

at com.aspose.slides.PresentationEx.char(Unknown Source)

at com.aspose.slides.PresentationEx.do(Unknown Source)

at com.aspose.slides.PresentationEx.do(Unknown Source)

at com.aspose.slides.PresentationEx.do(Unknown Source)

at com.aspose.slides.PresentationEx.write(Unknown Source)

at com.aspose.slides.PresentationEx.write(Unknown Source)

at HelloWorld3.main(HelloWorld3.java:35)

Compiling under 2.9.6 also runs successfully (after some modifications), but I encounter the following error

Exception in thread “main” java.lang.NoClassDefFoundError: com/sun/media/jai/codec/ByteArraySeekableStream

at com.aspose.slides.obfuscated.eau$16.do(Unknown Source)

at com.aspose.slides.obfuscated.bfy.if(Unknown Source)

at com.aspose.slides.obfuscated.bfy.(Unknown Source)

at com.aspose.slides.obfuscated.eau.if(Unknown Source)

at com.aspose.slides.obfuscated.eau.(Unknown Source)

at com.aspose.slides.pptx.PresentationEx.(Unknown Source)

at com.aspose.slides.pptx.PresentationEx.(Unknown Source)

at HelloWorld.main(HelloWorld.java:17)

Caused by: java.lang.ClassNotFoundException: com.sun.media.jai.codec.ByteArraySeekableStream

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)

… 8 more

Java version as below

Java™ SE Runtime Environment (build 1.6.0_07-b06)

Java HotSpot™ 64-Bit Server VM (build 10.0-b23, mixed mode)

On a custom linux kernel.

Hi Jason,

Thanks for your interest in Aspose.Slides.

Thanks for highlighting the issues. I have made the necessary modifications. You can please visit the following link for your kind reference to access the correct sample code: http://www.aspose.com/docs/display/slidesjava/Hello+World+Application+using+for+PPTX+using+Aspose.Slides+for+Java
Please try using the shared code sample as I have verified it on my end using Windows 7 installed with JDK 1.6 without any issue.

Now for your second issue with using Aspose.Slides for Java 2.9.6. Actually, all Aspose.Slides for Java versions till v2.9.6 depends upon JAI image libraries for rendering presentations. I would suggest you to please try using Aspose.Slides for Java 3.0.0 as we will provide support on the basis of that. You can still access the JAI jar files if you wish to use Aspose.Slides for Java 2.9.6 from this link:
http://dl.dropbox.com/u/72783084/Jai.rar

Many Thanks,

As noted in my first post I still get an error when running this on 3.0.0, even with your update version. This is on our development environment. It works as is on my personal Mac OS X 10.7.5. It should be noted that the pptx file is generated, but no content is provided on my linux setup (errors out before the rest of the writing?).



I have attached the system details, where the exception is thrown. I have also attached the java file and the generated pptx file. The exception has be provided below, again, for your convenience. Please let me know if you need any help as this is rather time sensitive.



Exception in thread “main” java.lang.IllegalStateException: Cannot find resource ‘/Aspose/Resources/GenBasR.ttf’.

at com.aspose.slides.a.B.if(Unknown Source)

at com.aspose.slides.a.h.r.do(Unknown Source)

at com.aspose.slides.a.l.h.char(Unknown Source)

at com.aspose.slides.a.l.h.byte(Unknown Source)

at com.aspose.slides.a.l.h.do(Unknown Source)

at com.aspose.slides.a.l.j.do(Unknown Source)

at com.aspose.slides.a.l.j.do(Unknown Source)

at com.aspose.slides.a.l.j.do(Unknown Source)

at com.aspose.slides.lU.(Unknown Source)

at com.aspose.slides.GU.int(Unknown Source)

at com.aspose.slides.GU.final(Unknown Source)

at com.aspose.slides.co.do(Unknown Source)

at com.aspose.slides.SlideEx.do(Unknown Source)

at com.aspose.slides.SlideEx.do(Unknown Source)

at com.aspose.slides.PresentationEx.char(Unknown Source)

at com.aspose.slides.PresentationEx.do(Unknown Source)

at com.aspose.slides.PresentationEx.do(Unknown Source)

at com.aspose.slides.PresentationEx.do(Unknown Source)

at com.aspose.slides.PresentationEx.write(Unknown Source)

at com.aspose.slides.PresentationEx.write(Unknown Source)

at HelloWorld3.main(HelloWorld3.java:35)

Hi Jason,


Thanks for your feedback. I have created an issue with ID SLIDESJAVA-33572 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved. Can you please also share the information about the development environment you have. You have mentioned that you have used Linux. Please share the information in this regard.

We are sorry for your inconvenience,

Hi Jason,


Can you please try using Aspose.Slides for Java 6.7.1 on your end for verification of Hello World application. If there is still an issue then please share the complete environment details with us. I will try to help you further in this regard.

Many Thanks,

The issues you have found earlier (filed as SLIDESJAVA-33572) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.