wood burning stoves 2.0*
The moose likes Websphere and the fly likes Displaying charts in websphere. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "Displaying charts in websphere." Watch "Displaying charts in websphere." New topic
Author

Displaying charts in websphere.

Andres Delrotti
Ranch Hand

Joined: Aug 11, 2005
Posts: 138
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
Bartender

Joined: Oct 14, 2005
Posts: 18649
    
    8

"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

Joined: Aug 09, 2006
Posts: 6
Do you know which jar X11GraphicsEnvironment is supposed to be in and if that is located on your file system?
Andres Delrotti
Ranch Hand

Joined: Aug 11, 2005
Posts: 138
^^
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
Bartender

Joined: Oct 14, 2005
Posts: 18649
    
    8

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying charts in websphere.