Monday, June 20, 2005

Jasper Reports X11 error

When running a Jasper Report, get the following error once, then a ClassDefNotFound error:

java.lang.InternalError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable

My original solution was to load dtlogin as a daemon, or xfvb if no dtlogin. However, this stopped working a few weeks later for unknown reasons.

A better solution, if using JDK 1.4+, is to edit start.sh in $CATALINA_HOME/bin and add the following to JAVA_OPTS variable:

-Djava.awt.headless=true

The necessary X libraries are then loaded by the JDK. Should take less system resources than running X itself, and be more reliable.

No comments:

Labels

Blog Archive

Contributors