Error "Connect to X11 window server using ‘localhost:0.0’ in linux Server" while using Aspose.Cells for Java

Hi Team,


We are using aspose-cells-7.3.1 jars to generate excel.

we are getting the below error when trying to generate excel from command line.

Exception in thread “main” java.lang.InternalError: Can’t connect to X11 window server using ‘localhost:0.0’ as the value of the DISPLAY variable.
at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at sun.awt.X11GraphicsEnvironment.access$100(X11GraphicsEnvironment.java:52)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:155)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:131)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68)
at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1135)
at java.awt.image.BufferedImage.getGraphics(BufferedImage.java:1125)
at com.aspose.cells.b.a.b.i.a(Unknown Source)
at com.aspose.cells.xT.a(Unknown Source)
at com.aspose.cells.WorksheetCollection.W(Unknown Source)
at com.aspose.cells.WorksheetCollection.(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at TestAspose.main(TestAspose.java:21)

please find the attachment.

can you please suggest fix for this issue.


Thanks,
EiS Technlogies.

Hi,

Thanks for your posting and using Aspose.Cells for Java.

Please add all the required libraries in your class path and see if it resolves your issue. Please also download and use the latest version: Aspose.Cells for Java (Latest Version).

  • aspose-cells-7.5.3.1.jar
  • bcprov-jdk16-146.jar
  • dom4j-1.6.1.jar

If your problem still occurs, then please provide us screenshot highlighting your issue. We will look into it and help you asap.

Hi,

Thanks for your posting and using Aspose.Cells for Java.

We have looked into your issue further. Please use the JVM option

-Djava.awt.headless=true

It should fix your issue.

Hi Team,


We tried with latest jars.

the problem still exists and getting below error…

#

An unexpected error has been detected by Java Runtime Environment:

SIGSEGV (0xb) at pc=0x062372a3, pid=28568, tid=3086252944

Java VM: Java HotSpot™ Client VM (10.0-b23 mixed mode linux-x86)

Problematic frame:

V [libjvm.so+0x2372a3]

An error report file with more information is saved as:

/ed1/eld16/inst/apps/eld16_eld16/logs/appl/conc/log/hs_err_pid28568.log

If you would like to submit a bug report, please visit:

Bug Report

please find the screen shot and error log.

Thanks,
EiSTechnlogies.

Hi Team,


We tried with latest jars.

the problem still exists and getting below error… can anyone please suggest on the below issue as we are holding the patch to release

Please let me know ASAP…

#

An unexpected error has been detected by Java Runtime Environment:

SIGSEGV (0xb) at pc=0x062372a3, pid=28568, tid=3086252944

Java VM: Java HotSpot™ Client VM (10.0-b23 mixed mode linux-x86)

Problematic frame:

V [libjvm.so+0x2372a3]

An error report file with more information is saved as:

/ed1/eld16/inst/apps/eld16_eld16/logs/appl/conc/log/hs_err_pid28568.log

If you would like to submit a bug report, please visit:

Bug Report

please find the screen shot and error log.

Thanks,
EiSTechnlogies.

Hi,

Thanks for your posting and using Aspose.Cells for Java.

Did you try the JVM option? Such errors are resolved with this option. Please use the following JVM option and let us know your run results.

JVM Option:

-Djava.awt.headless=true

Hi,


And, please see the documents for your reference:
http://forum.fusioncharts.com/topic/5420-jsp-export-problem-in-solarisunixlinux/
http://www.idautomation.com/kb/xwindow-error.html

Thank you.

Hi Team,



Tried with the JVM Option -Djava.awt.headless=true,

when generate excel from application it is getting generated, but issue is coming when distributing the excel file it is not getting generated. getting the above error.

Can you please suggest on this…


Thank you for your support,
EiS Technologies.

Hi,

Thanks for your posting and using Aspose.Cells for Java.

It seems, your issue is resolved. However, your issue is not clear. Please explain your issue more in detail. Also explain this line more “but issue is coming when distributing the excel file it is not getting generated. getting the above error.”