Problem with Aspose Slides on Linux

I have an exception trying to save a ppt to pdf in a Linux platform.
also Aspose slides seems to need access to an X server.
This is critical to us as our deployment env is in Linux


sdn-vm05:~/aspose # uname -a
Linux sdn-vm05 2.6.5-7.315-smp #1 SMP Wed Nov 26 13:03:18 UTC 2008 x86_64 x86_64 x86_64 GNU/Linux
sdn-vm05:~/aspose # ./run_ppt.sh first.ppt first.pdf
java.lang.NullPointerException
at com.aspose.slides.obfuscated.adb.do(SourceFile:760)
at com.aspose.slides.obfuscated.adb.else(SourceFile:724)
at com.aspose.slides.obfuscated.adb.this(SourceFile:716)
at com.aspose.slides.obfuscated.adb.for(SourceFile:285)
at com.aspose.slides.obfuscated.adb.do(SourceFile:72)
at com.aspose.slides.obfuscated.adb.if(SourceFile:87)
at com.aspose.slides.obfuscated.ty.(SourceFile:17)
at com.aspose.slides.obfuscated.afd.(SourceFile:20)
at com.aspose.slides.obfuscated.ty.do(SourceFile:42)
at com.aspose.slides.obfuscated.mx.do(SourceFile:44)
at com.aspose.slides.obfuscated.aig.do(SourceFile:33)
at com.aspose.slides.obfuscated.ajl.do(SourceFile:90)
at com.aspose.slides.obfuscated.yg.do(SourceFile:106)
at com.aspose.slides.obfuscated.gq.do(SourceFile:38)
at com.aspose.slides.obfuscated.sh.do(SourceFile:12)
at com.aspose.slides.obfuscated.ajm.do(SourceFile:12)
at com.aspose.slides.obfuscated.sh.do(SourceFile:12)
at com.aspose.slides.obfuscated.cc.do(SourceFile:83)
at com.aspose.slides.obfuscated.yg.do(SourceFile:65)
at com.aspose.slides.obfuscated.vr.do(SourceFile:54)
at com.aspose.slides.Presentation.save(SourceFile:3398)
at com.aspose.slides.Presentation.save(SourceFile:3346)
at Ppt2Pdf.main(Ppt2Pdf.java:31)
com.aspose.slides.PptException: java.lang.NullPointerException
at com.aspose.slides.obfuscated.vr.do(SourceFile:64)
at com.aspose.slides.Presentation.save(SourceFile:3398)
at com.aspose.slides.Presentation.save(SourceFile:3346)
at Ppt2Pdf.main(Ppt2Pdf.java:31)
Caused by: java.lang.NullPointerException
at com.aspose.slides.obfuscated.afd.if(SourceFile:208)
at com.aspose.slides.obfuscated.ty.(SourceFile:21)
at com.aspose.slides.obfuscated.afd.(SourceFile:20)
at com.aspose.slides.obfuscated.ty.do(SourceFile:42)
at com.aspose.slides.obfuscated.mx.do(SourceFile:44)
at com.aspose.slides.obfuscated.aig.do(SourceFile:33)
at com.aspose.slides.obfuscated.ajl.do(SourceFile:90)
at com.aspose.slides.obfuscated.yg.do(SourceFile:106)
at com.aspose.slides.obfuscated.gq.do(SourceFile:38)
at com.aspose.slides.obfuscated.sh.do(SourceFile:12)
at com.aspose.slides.obfuscated.ajm.do(SourceFile:12)
at com.aspose.slides.obfuscated.sh.do(SourceFile:12)
at com.aspose.slides.obfuscated.cc.do(SourceFile:83)
at com.aspose.slides.obfuscated.yg.do(SourceFile:65)
at com.aspose.slides.obfuscated.vr.do(SourceFile:54)
… 3 more


Hi Oded,

I have observed the exception shared by you but in order to further investigate and resolve the issue, I request you to kindly provide source presentation file along with the platform information. Please also share that which version of Aspose.Slides for Java you are using. Looking forward for a positive response from your side.

Thanks and Regards,

Hi,
I’m using Aspose slides 2.2.0
I have attached the problematic presentation, although any presentation does not work.
I have the following jars in the classpath:

aspose-metafiles-1.6.1-20100110.jar
aspose-slides-2.2.0-20100328.jar
Aspose.Cells.jaraspose.pdf.jar
aspose.pdf.kit.jar
Aspose.Words.jdk15.jar
clibwrapper_jiio.jar
dom4j-1.6.1.jar
jai_codec.jar
jai_core.jar
jai_imageio.jar
mlibwrapper_jai.jar

I also put the shared libs
libclib_jiio.so libmlib_jai.so in a directory in the LD_LIBRARY_PATH var

The platform is Suse Linux 10 64bit

This works on windows.

Thanks
Oded

The code is simple:

Presentation pe = new Presentation(args[0]);
com.aspose.slides.export.PdfOptions opts = new PdfOptions();
opts.setJpegQuality(5);
opts.setTextCompression(PdfTextCompression.FLATE);
pe.save(args[1], SaveFormat.PDF,opts);

Hi Oded,

Thanks for sharing added piece of information as it will be really helpful in resolving the issue. An issue with ID 18045 has been created in our issue tracking system for further investigation and resolution. This thread has also been linked with the issue, so that you may be automatically notified, once the issue is resolved.

We are sorry for your inconvenience,

Is this issue not fixed yet? I have same problem and it’s essential for me to make it working on linux.

One more question,
is it working on solaris, or not?

Dear Ivan,

I regret to share with you that the issue status requested by you from our issue tracking system and the issue is still unresolved. I have requested our development team to provide the update status and as soon as some information is shared by them, I will be obliged to share that with you.

Thanks and Reagrads,

Hi
I still have a problem on Linux using the SAP jvm converting ppt to pdf
I’m using the latest Aspose total 10-2010

Here is the stack trace:
caused by: java.lang.NullPointerException
at com.aspose.slides.obfuscated.alj.if(SourceFile:208)
at com.aspose.slides.obfuscated.ki.(SourceFile:21)
at com.aspose.slides.obfuscated.alj.(SourceFile:20)
at com.aspose.slides.obfuscated.ki.do(SourceFile:42)
at com.aspose.slides.obfuscated.gr.do(SourceFile:44)
at com.aspose.slides.obfuscated.sj.do(SourceFile:33)
at com.aspose.slides.obfuscated.tc.do(SourceFile:90)
at com.aspose.slides.obfuscated.aho.do(SourceFile:94)
at com.aspose.slides.obfuscated.xq.do(SourceFile:38)
at com.aspose.slides.obfuscated.jn.do(SourceFile:12)
at com.aspose.slides.obfuscated.td.do(SourceFile:12)
at com.aspose.slides.obfuscated.jn.do(SourceFile:12)
at com.aspose.slides.obfuscated.uy.do(SourceFile:83)
at com.aspose.slides.obfuscated.aho.do(SourceFile:55)
at com.aspose.slides.obfuscated.lj.do(SourceFile:57)

Hello Dears,

Can you please try using the following java command line option on your end to verify the things and hopefully the things may start working for you.

-Djava.awt.headless=true

You may please also consult this thread link for further information.

Thanks and Regards,

Hi,

I’m running with -Djava.awt.headless and still getting the NullPointerException I posted.
This works with jdk 6 but not with JDK 5
and yes I’m using the correct jars.
Here is my run script:


#!/bin/sh


JARS=jars/aspose-cells-2.4.2.jar:jars/aspose-metafiles-1.7.0.jar:jars/aspose-pdf-2.7.0-jdk15.jar:jars/aspose-pdf-2.7.0-jdk15.jar:jars/aspose-pdf-kit-3.4.0.jar:jars/aspose-slides-2.4.0.jar:jars/Aspose.Words.jdk15.jar:jars/dom4j-1.6.1.jar:jars/log4j-1.2.16.jar:jars/clibwrapper_jiio.jar:jars/jai_codec.jar:jars/jai_core.jar:jars/jai_imageio.jar:jars/log4j-1.2.16.jar:jars/mlibwrapper_jai.jar

LD_LIBRARY_PATH=.


JAVA=/usr/sap/SDH/J00/exe/sapjvm_5/bin/java
echo $JAVA -cp $JARS:. Ppt2Pdf $1 $2
$JAVA -cp $JARS:. Ppt2Pdf $1 $2


Hello Dear,

I have shared the issue with our development team. The current issue that you have faced is because of some problems with loading or parsing fonts. I think the true type fonts or something similar may be unavailable in your system . There should be at least Arial and Times New Roman fonts but for normal work all true type fonts used in a presentation should be installed and available. Can you please verify the availability of mentioned fonts in your system.

Thanks and Regards,

I don’t think this is the problem since the conversion does work on a system running Java 6.
However, how do I tell Aspose slides where to find the fonts ?
I do this using setFontsDirectory for Aspose word and that works on all platforms

Hello,

Aspose.Slides reads /etc/fonts/fonts.conf config file to find all font directories.

The system requirements for correct Aspose.Slides work is SUN JRE. Do you use SUN or SAP JVM?

There is excerpt from SAP site:

Integration

The SAP JVM
is derived from Sun’s HotSpot VM and JDK implementation. Therefore it
contains most of the features and functionality covered by Sun’s JDK.
However, the SAP JVM is only targeting server-side applications. Certain
features related to client environments are intentionally omitted
or are not supported for general use.


So that is possible that Aspose.Slides uses some features for rendering which are not available in the SAP JVM. We will investigate this problem if you can provide SAP JVM for testing since, if I’m not mistaken, it’s not available for free download.

Hi,
We have updated to the latest sapjvm_5 and now the exception is more clear:

r:jars/clibwrapper_jiio.jar:jars/jai_codec.jar:jars/jai_core.jar:jars/jai_imageio.jar:jars/log4j-1.2.16.jar:jars/mlibwrapper_jai.jar:. Ppt2Pdf first.ppt first.pdf

com.aspose.slides.PptException: java.lang.NullPointerException: while trying to invoke the method com.aspose.slides.obfuscated.wm.int() of an object loaded from field com.aspose.slides.obfuscated.alj.for of an object loaded from local variable ‘<0>’
at com.aspose.slides.obfuscated.lj.do(SourceFile:69)
at com.aspose.slides.Presentation.save(SourceFile:3401)
at com.aspose.slides.Presentation.save(SourceFile:3349)
at Ppt2Pdf.main(Ppt2Pdf.java:34)
Caused by: java.lang.NullPointerException: while trying to invoke the method com.aspose.slides.obfuscated.wm.int() of an object loaded from field com.aspose.slides.obfuscated.alj.for of an object loaded from local variable ‘<0>’
at com.aspose.slides.obfuscated.alj.if(SourceFile:208)
at com.aspose.slides.obfuscated.ki.(SourceFile:21)
at com.aspose.slides.obfuscated.alj.(SourceFile:20)
at com.aspose.slides.obfuscated.ki.do(SourceFile:42)
at com.aspose.slides.obfuscated.gr.do(SourceFile:44)
at com.aspose.slides.obfuscated.sj.do(SourceFile:33)
at com.aspose.slides.obfuscated.tc.do(SourceFile:90)
at com.aspose.slides.obfuscated.aho.do(SourceFile:94)
at com.aspose.slides.obfuscated.xq.do(SourceFile:38)
at com.aspose.slides.obfuscated.jn.do(SourceFile:12)
at com.aspose.slides.obfuscated.td.do(SourceFile:12)
at com.aspose.slides.obfuscated.jn.do(SourceFile:12)
at com.aspose.slides.obfuscated.uy.do(SourceFile:83)
at com.aspose.slides.obfuscated.aho.do(SourceFile:55)
at com.aspose.slides.obfuscated.lj.do(SourceFile:57)

Hello Dear,

I have shared the issue with our development team and as soon as some feedback is received from them, I will be glad to share that with you. We really appreciate your patience for that.

Thanks and Regards,

Hi,

I managed to solve the problem, it was related to the installation of the truetype fonts and not to the SAPJVM.


Oded


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


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.
(6)

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan