java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment

I'm using NetBeans 5.5.1 IDE with Visual Web Pack. My OS is Linux Fedora Core 6 and the server is Sun Java System Application Server.
I'm developing an application which includes a JSP to display a bar-chart graph using CeWolf.
I get the following two severe errors on running the JSP:

1.  Message ID: StandardWrapperValve[CewolfServlet]
Servlet.service() for servlet CewolfServlet threw exception
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
at java.lang.Class.forName0(Native Method)

2.Message ID: CewolfServlet
Could not initialize class sun.awt.X11GraphicsEnvironment
java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(
      at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(
      at sun.awt.X11.XToolkit.<clinit>(
 I'd appreciate your kind guidance in solving this problem    
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Do you have a X11 server daemon running on the server? Because this class is using native codes which on Unix need X11.
The other option would be to use PJA Toolkit ( instead of the standard AWT

Although... which JDK you use? For 1.4.2+,  it may be enough to use java.awt.headless=true
setProperty( "java.awt.headless", true ); in the code or as a start parameter.
RrugemaliraAuthor Commented:
I'm using jdk1.6.0_02
The system monitor shows I have Xorg sleeping but consuming CPU. Moreover, I'm working in graphics mode with the netbeans IDE and I can see some graphics on the JSP pages when my application is running (except for the chart component)
You will forgive my ignorance, but I do now know where to setProperty("java.awt.headless", true)
In which code do I set it? In the jsp that renders the chart? In the bean that implements the dataset producer?
Honesly - I do not remember.. Haven't touched AWT from years. I would try with the bean.

The error is definitely claiming that there is no X server.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
System.setProperty("java.awt.headless", "true");
aslo see   
RrugemaliraAuthor Commented:
I entered into Sun Java System Application Server Administration Console
Clicked on:
Application Server --> JVM Settings --> JVM Options
and added the JVM option: -Djava.awt.headless=true
Stopped the server and re-started it.
I'm now able to display the bar-chart graphics. Praise be to God!
I thank all of you for your kind help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java EE

From novice to tech pro — start learning today.