Java – 64-bit SLES11 machines can’t run java graphical apps in Citrix

citrixjavasles

We have a number of lab machines with different configurations. When one of our users tries to run a java application, such as jconsole, it will seem to start but there will be no display forwarding and no window will be shown. Under these conditions it will fail:

  • 64-bit Suse SLES11 installation on server
  • Client accesses servers through Citrix
  • The application is a java application

Change any of these and it works. 64-bit SLES10 machines work, 32-bit SLES11 machines work, accessing a 64-bit SLES11 machine with cygwin/linux works, running other applications than java applications works.

Is there some change in SuSE from SLES10 to SLES11 which might affect the display forwarding in Citrix?

Sometimes, after a varying amount of time, it crashes with this stack trace:

Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:169) 
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:68) 
    at sun.awt.X11.XToolkit.<clinit>(XToolkit.java:89) 
    at java.lang.Class.forName0(Native Method) 
    at java.lang.Class.forName(Class.java:169) 
    at java.awt.Toolkit$2.run(Toolkit.java:834) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:826) 
    at sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:128) 
    at javax.swing.plaf.metal.MetalLookAndFeel.initComponentDefaults(MetalLookAndFeel.java:1556) 
    at javax.swing.plaf.basic.BasicLookAndFeel.getDefaults(BasicLookAndFeel.java:130) 
    at javax.swing.plaf.metal.MetalLookAndFeel.getDefaults(MetalLookAndFeel.java:1591) 
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:542) 
    at javax.swing.UIManager.setLookAndFeel(UIManager.java:582) 
    at javax.swing.UIManager.initializeDefaultLAF(UIManager.java:1344) 
    at javax.swing.UIManager.initialize(UIManager.java:1433) 
    at javax.swing.UIManager.maybeInitialize(UIManager.java:1421) 
    at javax.swing.UIManager.getLookAndFeel(UIManager.java:495) 
    at sun.tools.jconsole.JConsole.updateLafValues(JConsole.java:63) 
    at sun.tools.jconsole.JConsole.<clinit>(JConsole.java:58) 
Could not find the main class: sun.tools.jconsole.JConsole.  Program will exit. 

UPDATE: Still having the same problem, when changing to a different graphics lib it seems to change the problem:

export JAVA_HOME=/usr/java/default
export PJA=$HOME/lib/pja.jar
jconsole -J-Xbootclasspath:$JAVA_HOME/jre/lib/rt.jar:$PJA -J-Dawt.toolkit=com.eteks.awt.PJAToolkit -version

This produces the version, which it did not previously. The program still can't run though.

Best Answer

This has now finally been resolved, so I'm gonna leave this answer here for anyone else bumping into the same problem, since it's very unusual. Citrix has acknowledged that this is a problem with their product and has released a patch for this problem.

The Service Request number at Citrix is 60235154 and the patch will be included in the 2011 Q1 Feature Pack v3.

Related Topic