Required X11 libraries for CentOS

Hello,

I am currently using following Aspose products.

aspose-words - 12.1.0
aspose-imaging - 2.1.0.0]
aspose-cells - 8.3.2
aspose.slides - 15.3.0
aspose-pdf - 9.7.1

I am planning to run these conversions in "CentOS release 6.7".

We have been getting few X11 errors depending on which conversion is being performed. I have listed some errors below.

Is there a list of required X11 libraries that need to be installed to run above Aspose products?

Thank You.



1.
Root Exception stack trace:
java.lang.InternalError: Can't connect to X11 window server using 'localhost:10.0' as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$200(X11GraphicsEnvironment.java:65)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:110)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)




2. 1MBJPG.jpg

Root Exception stack trace:
java.lang.NoClassDefFoundError: Could not initialize class com.aspose.imaging.internal.z.k
at com.aspose.imaging.internal.cb.a.a(Unknown Source)
at com.aspose.imaging.internal.ci.i.load(Unknown Source)
at com.aspose.imaging.Image.a(Unknown Source)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)



3. 100KBDOC.doc

Root Exception stack trace:
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11.XToolkit
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at java.awt.Toolkit$2.run(Toolkit.java:868)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)



4. TEST.ppt

java.lang.NoClassDefFoundError: Could not initialize class com.aspose.pdf.internal.p243.z23
at com.aspose.pdf.internal.p243.z31.m1(Unknown Source)
at com.aspose.pdf.internal.p243.z31.(Unknown Source)
at com.aspose.pdf.internal.p243.z2.(Unknown Source)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)



5. 100KBTXT.txt

java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
+ 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

Hi Tashani,

Sorry, we were not able to reproduce this issue using the latest versions of these APIs. You are using very old versions of the APIs. Can you please test with the latest versions and share your complete code and the steps to reproduce the issue if the problem persists?

You can check license folder when you install any Aspose API to find a list of third party APIs used by the Aspose APIs.

Best Regards,

I downloaded all the new libraries. Only tried to convert a Word document. Here is the error:


********************************************************************************
Message : Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable. (java.lang.InternalError). Message payload is of type: ReceiverFileInputStream
Code : MULE_ERROR-29999
--------------------------------------------------------------------------------
Exception stack is:
1. Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable. (java.lang.InternalError)
sun.awt.X11GraphicsEnvironment:-2 (null)
2. Can’t connect to X11 window server using ‘localhost:10.0’ as the value of the DISPLAY variable. (java.lang.InternalError). Message payload is of type: ReceiverFileInputStream (org.mule.api.MessagingException)
org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html)



Here is the code:

Document doc = null;
try {
doc = new Document(is);
} finally {
is.close();
}

ImageSaveOptions options = new ImageSaveOptions(SaveFormat.TIFF);
options.setResolution(300);
options.setTiffCompression(TiffCompression.LZW);
doc.save(test.TIFF", options);

Hi Tashani,

During our initial investigation, we were not able to reproduce the issue. Can you please also share which Java version are you using and a sample document?

Best Regards,

We used -Djava.awt.headless=true property and the conversions are working now. Thanks for looking into this.

Hi Tashani,

Good to know that you have found the solution and thanks for sharing with us.

Best Regards,