Chart in Websphere

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
hgeeks

Chart in Websphere

Post by hgeeks » Wed Sep 11, 2002 11:37 pm

Hi, I am working with websphere application server 3.5 on NT and I am trying to get JFreeChart running. I have managed it on Tomcat 4 on NT but with websphere I alwas get the error message :

[02.09.11 17:06:24:617 GMT-05:00] 10041746 WebGroup X Root Cause
java.lang.ExceptionInInitializerError: java.lang.NullPointerException
at javax.swing.ImageIcon.<init>(ImageIcon.java:108)
at com.jrefinery.chart.JFreeChartInfo.<init>(Unknown Source)
at com.jrefinery.chart.JFreeChart.<clinit>(Unknown Source)
at com.jrefinery.chart.ChartFactory.createPie3DChart(Unknown Source)
... etc

any ideas?

Regards,

hgeeks

Navin Pathuru

Re: Chart in Websphere

Post by Navin Pathuru » Thu Sep 12, 2002 3:20 pm

hggeks

Just a guess:
I think you are missing JCommon files. Try importing JCommon classes and test it.

Regards,
Navin Pathuru

hgeeks

Re: Chart in Websphere

Post by hgeeks » Thu Sep 12, 2002 5:01 pm

Hi Navin,

No, I have jcommon-0.6.4.jar and jfreechart-0.9.2.jar in my classpath on WebSphere.

Do I need upgrade my jar's version?

but why I get this line?

javax.swing.ImageIcon.<init>(ImageIcon.java:108)

I don't understand...

thank you, any idea?

Regards Hgeeks.

David Gilbert

Re: Chart in Websphere

Post by David Gilbert » Thu Sep 12, 2002 5:24 pm

Hi,

I have heard reports of problems loading jpegs from jar files under some circumstances. In 0.9.2, the gorilla.jpg file is included as the logo for JFreeChart in the JFreeChartInfo class...and it was getting loaded when the class is first initialised. In 0.9.3, the image is loaded (using javax.swing.ImageIcon) only when it is first referenced (which might be never in your application). So, if you can, upgrade to 0.9.3.

Regards,

DG.

hgeeks

Re: Chart in Websphere

Post by hgeeks » Thu Sep 12, 2002 5:51 pm

Hi David,

Thank you I upgrade to 0.9.3 and my application run very well...

Regards, and again thank you for your time and help...

Hgeeks.

Locked