Page 1 of 1

Version troubles

Posted: Mon Jun 14, 2004 7:09 pm
by Stacey
I am working on an application which uses the jfreechart api and, as of the last 6months, the jfreereport api also.

The trouble I have is finding jfreechart/jfreereport/jcommon compatabilities. It seems like once I get jfreechart supported in my application and then attempt to get jfreereport supported...the jcommon version for each api is different.

For example, currently
Jfreechart - 0.9.20 with jcommon 0.9.5
jfreereport - 0.8.4_10 with jcommon 0.9.3a
jfreereport_ext - 0.8.4_10 with jfreechart 0.9.13

Any recommendations of which version/api to start with and build up compatability from there?
I'd really like to keep with the latest of each version...especially the jfreechart api because it has changed so much in the last few would be really hard to downgrade.

Is there an easy way to build a release all of jfree api(s) together so versions are kept compatible?

Thanks for product!

Posted: Mon Jun 14, 2004 9:39 pm
by Taqua

the JFreeChart-version of JFreeReport-ext can be replaced by an later version - it is just used for the chart-demo.

The new JCommon version has an ugly flaw (evil me!) as it breaks the most unimportant class of JFreeReport.

Compatibility can be restored by replacing the class with the code below:

Code: Select all


import java.util.Arrays;

import org.jfree.JCommon;
import org.jfree.base.Library;
import org.jfree.ui.about.Contributor;
import org.jfree.ui.about.Licences;
import org.jfree.ui.about.ProjectInfo;

 * Details about the JFreeReport project.
 * @author David Gilbert
public class JFreeReportInfo extends ProjectInfo implements Cloneable
   * Constructs an object containing information about the JFreeReport project.
   * <p>
   * Uses a resource bundle to localise some of the information.
  public JFreeReportInfo()
        ("(C)opyright 2000-2003, by Thomas Morgner, Object Refinery Limited and Contributors");

        new Contributor[]
          new Contributor("David Gilbert", ""),
          new Contributor("Thomas Morgner", ""),
          new Contributor("J\u00d6rg Sch\u00d6mer", ""),
          new Contributor("Heiko Evermann", "-"),
          new Contributor("Piotr Bzdyl", "-"),
          new Contributor("Patrice Rolland", "-"),
          new Contributor("Cedric Pronzato", "-")

    addLibrary(new Library("Pixie", "0.8.1", "LGPL",

   * Tries to read the licence text from jcommon. This method does not reference
   * jcommon directly, as this would increase the size of that class file.
   * @see org.jfree.ui.about.ProjectInfo#getLicenceText()
   * @return the licence text for this project.
  public String getLicenceText()
    return Licences.getInstance().getLGPL();

   * Print the library version and information about the library.
   * <p>
   * After there seems to be confusion about which version is currently used by
   * the user, this method will print the project information to clarify this
   * issue.
   * @param args ignored
  public static void main(final String[] args)
    final JFreeReportInfo info = new JFreeReportInfo();
    System.out.println(info.getName() + " " + info.getVersion());
    System.out.println("This project is licenced under the terms of the "
        + info.getLicenceName() + ".");
There are no other traps hidden and after that JFreeReport will happily work together with the newest JFreeChart version.

JFreeChart and JFreeReport *should* be fully compabile - except on these rare conditions where something ugly sneaked in - like now :(

Have more fun,
said Thomas

Posted: Tue Jun 22, 2004 6:00 pm
by Guest
will there be a release of jcommon SOON with the fixed class?

Posted: Wed Jul 21, 2004 4:23 pm
by md315
I hope so I have this problem as well......

Posted: Thu Jul 22, 2004 6:20 pm
by md315
I recently tried this solution a couple ways without success. I am able to build the project using the old version of JFreeReportInfo. But when I replace it with this code I get the following error from ANT.

Code: Select all

C:\OTHERL~1\JFREER~1\SOURCE>ant -f ..\ant\build.xml
Buildfile: ..\ant\build.xml



    [javac] Compiling 248 source files to C:\OTHERL~1\JFREER~1\build
    [javac] C:\OTHERL~1\JFREER~1\source\org\jfree\report\ package org.jfree.base does not exist
    [javac] import org.jfree.base.Library; 
    [javac]                       ^
    [javac] C:\OTHERL~1\JFREER~1\source\org\jfree\report\ cannot resolve symbol
    [javac] symbol  : method addLibrary (org.jfree.ui.about.ProjectInfo)
    [javac] location: class
    [javac]     addLibrary(JCommon.INFO); 
    [javac]     ^
    [javac] C:\OTHERL~1\JFREER~1\source\org\jfree\report\ cannot resolve symbol
    [javac] symbol  : class Library 
    [javac] location: class
    [javac]     addLibrary(new Library("Pixie", "0.8.1", "LGPL", 
    [javac]                    ^
    [javac] 3 errors

C:\OTHERL~1\JFREER~1\ant\build.xml:185: Following error occured while executing this line
C:\OTHERL~1\JFREER~1\ant\build-core.xml:51: Compile failed; see the compiler error output for details.

Total time: 5 seconds
Looking at the differences in the two versions this is the only difference I see;

new code that fails;

Code: Select all

    addLibrary(new Library("Pixie", "0.8.1", "LGPL", 		"")); 
old code that works;

Code: Select all

        new Library[]
          new Library(JCommon.INFO),
          new Library("Pixie", "0.8.1", "LGPL",

Any ideas? Am I missing a library that the other version doesn't need?

Posted: Fri Jul 23, 2004 3:22 pm
by md315
Ok since it looked as though the build couldn't find org.jfree.base.Library I realized that the build was still using jcommon-0.9.3a.jar rather than the jcommon-0.9.5.jar I had in the ant/lib directory. When I replaced that with jcommon-0.9.5.jar I got an error that the build required jcommon-0.9.3a.jar. Next I renamed jcommon-0.9.5.jar to jcommon-0.9.3a.jar and it looks to have compiled ok.

After doing this I got it working.

Version troubles

Posted: Mon Jul 26, 2004 8:59 pm
by demmons
I tried doing the rename trick.
This didn't work for me. Now JFreeChart is broken (see error below), and JFreeReport doesn't show the text in the table model i pass it. Any clue?

java.lang.VerifyError: (class: org/jfree/chart/JFreeChartInfo, method: <init> signature: ()V) Incompatible argument to function
at org.jfree.chart.JFreeChart.<clinit>(
at com.starkinvestments.rigor.client.ui.quotes.bonds.charts.Chart.getChart(
at com.starkinvestments.rigor.client.ui.quotes.bonds.charts.GenericChart.GenericGraphPanel.makeChart(
at com.starkinvestments.rigor.client.ui.quotes.bonds.charts.GenericChart.GenericGraphPanel.showChart(
at com.starkinvestments.client.ui.control.LazyInitTabbedPane$
at java.awt.event.InvocationEvent.dispatch(
at java.awt.EventQueue.dispatchEvent(
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
at java.awt.EventDispatchThread.pumpEventsForHierarchy(
at java.awt.EventDispatchThread.pumpEvents(
at java.awt.EventDispatchThread.pumpEvents(

Posted: Thu Jul 29, 2004 9:03 am
by david.gilbert
I performed the following steps which worked for me:

(1) Start with a clean copy of JFreeReport 0.8.4_10.

(2) Delete the jcommon-0.9.3a.jar file from the 'lib' directory.

(3) Copy the jcommon-0.9.5.jar file from the JFreeChart distribution to the 'lib' directory of your JFreeReport distribution.

(4) Edit as indicated at the top of the thread.

(5) Edit the file (in the 'ant' directory) replacing 'jcommon-0.9.3a.jar' with 'jcommon-0.9.5.jar'.

(6) Change to the 'ant' directory and type 'ant'. This will rebuild JFreeReport entirely (there are a couple of deprecation warnings, but you should see no errors).

Now you should have a version of JFreeReport that runs with the same version of JCommon (0.9.5) as JFreeChart.

Sorry for the trouble. We are working towards getting stable versions of JFreeChart, JFreeReport and JCommon released, but hopefully you can appreciate that with limited resources it can be difficult for us to keep everything working as it should.


Dave Gilbert
JFreeChart Project Leader

Posted: Mon Aug 09, 2004 8:24 pm
by BrianFox
Is there any work planned to allow us to upgrade jfreechart independantly from jfreereport?

Posted: Mon Aug 09, 2004 11:43 pm
by david.gilbert
BrianFox wrote:Is there any work planned to allow us to upgrade jfreechart independantly from jfreereport?
These two projects share code via the JCommon library. With most releases (of JFreeChart and JFreeReport) there have been no problems upgrading to the latest version of JCommon (usually things are added to JCommon but nothing is taken away). BUT we broke that in the latest JCommon release by accident. The fix (which is pretty straightforward) needs to be applied to JFreeReport, as outlined above.

Posted: Mon Sep 06, 2004 6:07 pm
by Brad Kieser
The fix works a treat. Thx for the details destructions, Dave, they were invaluable.

Still getting errors with jcommon-0.9.6.jar

Posted: Tue Sep 28, 2004 10:34 pm
by singhtjunior
I followed the instructions, the only difference is that I used jcommon-0.9.6.jar

My config consists of
jfreechart-0.9.21, jfreereport-0.8.4_10, and jcommon-0.9.6

My JDK version is JDK 1.4.2

After running ant in all three (chart, report, common), and making changes according to this thread, the system continues to spill errors.

The outcome of is the following:

Exception in thread "main" java.lang.NoSuchMethodError: org.jfree.ui.about.ProjectInfo.setLibraries(Ljava/util/List;)V

Does this only work with jcommon-0.9.5.jar?

Problem finding older versions of jfree package

Posted: Fri Jan 21, 2005 9:39 pm
by spyffe

I have a java program that needs to be updated. The program refers to an older version of the org.jfree package. It has a reference to, which I can not find in the latest (0.9.21) version. I tried searching for older versions, but could not locate any.

Where can I find the older versions of the package?


Posted: Fri Jan 21, 2005 10:20 pm
by Taqua

that package is in jcommon.

Have mo' fun,
said Thomas