• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying charts in websphere.

 
Andres Delrotti
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

We have this application that uses JFreeCharts. When we run it in WSAD, the applications works fine and the charts are displayed. Problem is, when we deploy it in Websphere and try to display these charts, we get this error:

java.lang.NoClassDefFoundError: sun/awt/X11GraphicsEnvironment

Anyone could help me on this?
[ August 17, 2006: Message edited by: aj delr ]
 
Paul Clapham
Sheriff
Posts: 20980
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"aj delr", welcome to the JavaRanch.

We're friendly here, but we do require members to have valid display names.

Display names must be at least two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names will be deleted.
 
Josh Hall
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you know which jar X11GraphicsEnvironment is supposed to be in and if that is located on your file system?
 
Andres Delrotti
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
^^
This is ajdelr, I changed my display name already.

Anyways, the jar file for that is already embedded with the ear file right? once I deploy it in websphere. I can't seem to figure it out why that kind of error happens when I deploy it in websphere.
 
Paul Clapham
Sheriff
Posts: 20980
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Andres Delrotti:
This is ajdelr, I changed my display name already.
Thank you, Andres. We appreciate that.

Anyway, the problem isn't anything to do with the way you deployed things. The problem is that JFreeChart uses graphics classes to produce its charts, and your installation of Websphere is running in a so-called "headless" environment where those graphics classes are not available.

If your version of Websphere is running on Java 1.4 (Websphere 5.1.2 or later I think) then you can probably fix that by setting the "java.awt.headless" system property to "true". You can set system properties via the admin application, and you'll have to restart the server for them to take effect.

And if that doesn't work then a web search for "jfreechart headless" should turn up a better solution for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic