Hi,
I am running wls6.1 on a Red hat box.
From my ejb, using some helper classes, i am trying to create the image of a bar chart( ofcourse thru awt ).
But at times this throws an exception
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
I have set the DISPLAY parameter properly.. but this problem recurs ..!!!
from a lot of discussion forums i learned that this is a common issue on serverside java under linux.... but nobody had susggested a solution!
any thoughts or similar experiance??
pls answer.
Discussions
EJB programming & troubleshooting: java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment
-
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment (3 messages)
- Posted by: sgt pepper
- Posted on: October 18 2002 03:53 EDT
Threaded Messages (3)
- java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment by Dave Costakos on October 18 2002 09:32 EDT
- java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment by sgt pepper on October 20 2002 09:19 EDT
- java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment by Clinton Lee on August 19 2004 01:26 EDT
-
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment[ Go to top ]
- Posted by: Dave Costakos
- Posted on: October 18 2002 09:32 EDT
- in response to sgt pepper
I recently had this exact same problem.
What happens it the first time you run the app using the awt classes, you get a java.lang.InternalError saying it can't connect to the X server using the specified display variable.
After that, you get NoClassDefFoundErrors as you mentioned.
I solved this by doing two things:
1. Installing a Virtual Frame Buffer.
2. Setting my Display Variable to the IP address of the host I am running on.
I just went to RPMFind.net and found the Virtual Frame Buffer RPM for my RedHat 7.2 distribution. Then I installed it. Next, I set the DISPLAy variable to the IP address of the machine the Web App was running on. Then, I started the Virtual Frame Buffer using the command:
/usr/X11R6/bin/Xvfb :0.0 -screen 0.0 1152x900x8 &
Finally, I restarted the web container.
As a side note, it is interesting that you posted this problem because I just encountered and fixed this problem yesterday . . . Spooky kind of.
Dave Costakos
-
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment[ Go to top ]
- Posted by: sgt pepper
- Posted on: October 20 2002 09:19 EDT
- in response to Dave Costakos
Thanks Man! ... it helped!
btw, What an accidental coincidence of the incidents!!!!
-
java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment[ Go to top ]
- Posted by: Clinton Lee
- Posted on: August 19 2004 01:26 EDT
- in response to Dave Costakos
Thanks Dave, this solved my hours of frustration too.
Clinton Lee