Sign in to follow this  
srividya_sharma

JSP Export problem in Solaris,Unix,Linux

Recommended Posts

Hi everybody,

In Unix/Linux/Solaris, there might be a problem while using java Graphics package.  ( as in the case of FusionCharts server-side exporter )

So when using FusionCharts for JSP export handler, you might run into the following exceptions:

SYMPTOMS

EXTERNALINTERFACE: Could not initialize class sun.awt.X11GraphicsEnvironment

java.lang.Class.forName0(Native Method)

java.lang.Class.forName( Class.java )

java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment. )

java.awt.image.BufferedImage.createGraphics(BufferedImage.java: )

OR

java.lang.NoClassDefFoundError

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:)

at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java: )

at java.awt.image.BufferedImage.createGraphics(BufferedImage.java: )

OR

java.lang.InternalError: Can't connect to X11 window server using ...

----

CAUSE

Most versions of the Java.AWT library on Unix/Linux/Solaris require a functioning X server. The X server and the DISPLAY environment variable are not correctly set. X server is not installed in the machine.

SOLUTION

The best solution is to run Java in headless mode.

This can be done by adding

-Djava.awt.headless=true

to server options. ( >= jdk 1.4.2 )

The other solutions involve installing a library like PJA library or a X server emulator.

Reference:

http://www.idautomation.com/kb/xwindow-error.html

 

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this