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

Technote (FAQ)
Problem
When the DISPLAY environment is not set for the application server Java™ virtual machine (JVM™) process, you receive the error "java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable" when trying to connect to the X11 server for graphics display.
Solution
When WebSphere® Application Server is running on UNIX® platforms that do not have graphics display support, the X11 server must be running to retrieve graphics from an application installed on WebSphere Application Server. If you receive the error,

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

in the logs when attempting to serve a page with graphics content, following these steps to solve the problem:
  1. Make sure the X11 window server is running, and use the following command to note the port number:

    ps -ef | egrep X11

  2. Set the environment variable for the application server JVM:
    For releases of WebSphere Application Server V3.5 and V4.0:
    1. Open the Administrative Console.

    2. Navigate to the following:

      WebSphere Administrative Domain > Nodes > node_name >Application servers >application server on which application is installed

    3. On the General tab, click Environment, then click Add and enter:
      • DISPLAY in the Name field
      • port # on which X11 is runningin the Value field (default is:0.0)

    4. Click OK, then click Apply.

    5. Restart the Application Server.

    For releases of WebSphere Application Server V5.0:
    1. Open the Administrative Console.

    2. Navigate to the following:

      Server > Application Servers >application server on which application is installed

    3. Under Configuration, select the Process Definition.

    4. Under Additional Properties, click Environment entries.

    5. Click New and enter:
      • DISPLAY in the Name field
      • port # on which X11 is runningin the Value field (default is:0.0).

    6. Optionally, enter a description about this variable.
Notes:
  1. Setting the DISPLAY variable using script or in cell by issuing,

    setenv DISPLAY=localhost:0.0 export DISPLAY

    results in setting this variable for only that script process or for the cell with the local scope.

  2. Use the xhost + command to make this variable to global scope with above.











Document Information

Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, General
Operating system(s): AIX, iSeries, HPUX, Linux, Linux zSeries, Linux zSeries, OS/390, Solaris
Software version: 3.5, 4.0, 5.0
Reference #: 1163846
IBM Group: Software Group
Modified date: 2004-04-14