JRE 1.6.0_21 and JFreeChart 1.0.13

A free public discussion forum for the JFreeChart class library.

JRE 1.6.0_21 and JFreeChart 1.0.13

Postby nodules » Wed Oct 13, 2010 10:23 am

In a HTML page I launch Java Applet(s) with a PHP code. It could be only one or more Applets, actually depends on the number of parameter I'd like to plot :
Code: Select all
for ($i=0;$i<count($parameter);$i++) {
   echo "<APPLET\n";
   echo "CODEBASE=\"./applets\"";
   echo "CODE=\"applet.init.AppletGraph\" WIDTH=100% HEIGHT=".$height."\n";
   echo "ARCHIVE=\"jcommon-1.0.16.jar, jfreechart-1.0.13.jar, jxl.jar, iText-5.0.1.jar, javacsv.jar, sAppletGraph.jar\">\n";
   echo "<PARAM NAME=parameter VALUE=\"".$parameter[$i]."\">\n";
   echo "<PARAM NAME=\"valeur\" VALUE=\"".$string."\">\n";
   echo "</APPLET>\n";
}


So, one parameter to plot gives one applet, and two gives two applets ...

My applets are created with the following code :
Code: Select all
package applet.init;

import org.jfree.chart.JFreeChart;
import javax.swing.JApplet;

public class AppletGraph extends JApplet {

   private static final long serialVersionUID = 8499358800188936023L;

   public JFreeChart jFreeChart;

   //init empty !!!
   public void init() {

   }

   // method never called !!!
   public JFreeChart toto(){

      JFreeChart chart = null;
      return chart;
   }
}

Troubles :
when I deal with only one parameter (thus only one Applet) works well !
when I deal with more than one parameter (thus more than one Applet on JVM), the first Applet still works well, but the other(s) not and I get back the following error:
Code: Select all
basic: exception : java.lang.ClassCircularityError: org/jfree/chart/JFreeChart.
java.lang.RuntimeException: java.lang.ClassCircularityError: org/jfree/chart/JFreeChart


If I include a CharPanel as
Code: Select all
package applet.init;

import java.awt.Container;

import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import javax.swing.JApplet;


public class AppletGraph extends JApplet {

   
   private static final long serialVersionUID = 8499358800188936023L;

   public JFreeChart jFreeChart;
   public ChartPanel chartPanel;

   //Init vide !!!
   public void init() {

      jFreeChart = toto();
      chartPanel = new ChartPanel(jFreeChart);
      Container content = getContentPane();
      content.add(chartPanel);
   }
   
   
   // une méthode jamais appelée !!!
   public JFreeChart toto(){
      
      JFreeChart chart = null;
      return chart;
   }
}

the error becomes
Code: Select all
basic: exception : java.lang.ClassCircularityError: org/jfree/chart/ChartPanel.
java.lang.RuntimeException: java.lang.ClassCircularityError: org/jfree/chart/ChartPanel

This appears only with JRE 1.6.0_21 since works well with 1.6.0_18 and previous.

Error sounds like incompatibilities between JFreeChart and new JAVA release since everything is fine when suppressing the toto() method from the code... but in that case why does it work when having only one applet ... ?

Any idea ?
Thanks !
nodules
 
Posts: 6
Joined: Wed Oct 13, 2010 8:25 am

Re: JRE 1.6.0_21 and JFreeChart 1.0.13

Postby matinh » Wed Oct 13, 2010 2:55 pm

Hi!

I don't know where the ClassCircularityError comes from, but we are using JFreeChart 1.0.13 with java 1.6.0_21-b06 without any problems here.

hth,
- martin
matinh
 
Posts: 467
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Re: JRE 1.6.0_21 and JFreeChart 1.0.13

Postby nodules » Thu Oct 14, 2010 7:14 pm

Mine is 1.6.0_21-b07. Do you see difference between b06 and b07 that could explain this error ?

However what is sure is that with the same code (mine) I obtain error with 1.6.0_21 and not with 1.6.0_18.
That could indicate (in my opinion) that non trivial stuff has change between this two versions. Any idea of what change is responsible for my JFreeChart error ?
nodules
 
Posts: 6
Joined: Wed Oct 13, 2010 8:25 am

Re: JRE 1.6.0_21 and JFreeChart 1.0.13

Postby matinh » Fri Oct 15, 2010 7:43 am

AFAIK 1.6.0_21-b07 is the first build made by Oracle. I really don't know if they changed something that could cause your problem. I don't have an installation of Java 1.6.0_21-b07 at hand and I don't know when I'm going to upgrade. Could you eventually install 1.6.0_21-b06 and test with this release, so we know that this is really the source of the problem.

hth,
- martin
matinh
 
Posts: 467
Joined: Fri Aug 11, 2006 10:08 am
Location: Austria

Re: JRE 1.6.0_21 and JFreeChart 1.0.13

Postby skunk » Fri Oct 15, 2010 1:55 pm

Oracle released 1.6.0_22 earlier this week. You might want to try that also -- although a quick look through the release notes did not seem to indicate any changes that might affect this problem.
skunk
 
Posts: 1087
Joined: Thu Jun 02, 2005 10:14 pm
Location: Brisbane, Australia


Return to JFreeChart - General

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot], Yahoo [Bot] and 10 guests

cron