We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem saving a pptx as PDF

Hi,


When the PresentationEx.save() method is invoked the following exception is raised:

java.lang.NoClassDefFoundError: Could not initialize class com.aspose.slides.alj

The logs:

[INFO] [talledLocalContainer] Apr 24, 2014 12:56:35 PM org.apache.catalina.core.
StandardWrapperValve invoke
[INFO] [talledLocalContainer] SEVERE: Servlet.service() for servlet [servlet-mod
ule-container-servlet] in context with path [/jira] threw exception [Servlet exe
cution threw an exception] with root cause
[INFO] [talledLocalContainer] java.lang.NoClassDefFoundError: Could not initiali
ze class com.aspose.slides.alj
[INFO] [talledLocalContainer] at com.aspose.slides.PictureEx.do(Unknown Source
)
[INFO] [talledLocalContainer] at com.aspose.slides.PictureEx.do(Unknown Source
)
[INFO] [talledLocalContainer] at com.aspose.slides.abt.do(Unknown Source)
[INFO] [talledLocalContainer] at com.aspose.slides.abt.if(Unknown Source)
[INFO] [talledLocalContainer] at com.aspose.slides.abt.(Unknown Source)
[INFO] [talledLocalContainer] at com.aspose.slides.GeometryShapeEx.do(Unknown
Source)
[INFO] [talledLocalContainer] at com.aspose.slides.GeometryShapeEx.for(Unknown
Source)
[INFO] [talledLocalContainer] at com.aspose.slides.PictureFrameEx.do(Unknown S
ource)
[INFO] [talledLocalContainer] at com.aspose.slides.GroupShapeEx.do(Unknown Sou
rce)
[INFO] [talledLocalContainer] at com.aspose.slides.SlideEx.do(Unknown Source)
[INFO] [talledLocalContainer] at com.aspose.slides.SlideEx.do(Unknown Source)
[INFO] [talledLocalContainer] at com.aspose.slides.bfl.if(Unknown Source)
[INFO] [talledLocalContainer] at com.aspose.slides.PresentationEx.do(Unknown S
ource)
[INFO] [talledLocalContainer] at com.aspose.slides.PresentationEx.save(Unknown
Source)

May you help me?
Thanks
Pablo

Hi Pablo,



If you are using an older version of the product, I would suggest you to
download and try the latest version of Aspose.Slides for Java v8.4.0.
If you still face any issue, please share your complete code and
template file with us. We will check your issue and get back to you
soon.



Thanks & Regards,

Hi Owais,


I’m using the latest version (8.4.0). I’m afraid I cannot share the application source code, furthermore it runs on JIRA so likely it would not easily testable. However, the code is pretty simple:

InputStream is = new FileInputStream(“some pptx”);
PresentationEx doc = new PresentationEx(is);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
doc.save(baos, com.aspose.slides.SaveFormat.Pdf);

The same code works fine in a standalone Java application when main() is invoked. But it fails when it runs on Tomcat (JIRA). Aspose Words and Calcs work pretty fine in the same environment. Slides seems to read the pptx files fine as the PresentationEx object is properly initialized without any error.

Does not the logs (error stacktrace) provide enough information?

Best regards,
Pablo.

Hi Pablo,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

<o:p> </o:p>

Thank you for the details.<o:p></o:p>

<o:p> </o:p>

Please share your template file with us for further investigation
at our end. <o:p></o:p>

<o:p> </o:p>

Thanks & Regards,<o:p></o:p>