A BeauTifful Life
A BeauTifful Life

Reputation: 53

JFreeChart: no such method error despite having loaded the library

I am using JFreeChart in a Java swing application. I did specify where the libraries are in my builder.xml file:

<zipgroupfileset dir="../lib" includes="jfreechart-0.9.21.jar" />
<zipgroupfileset dir="../lib" includes="jcommon-1.0.8.jar" />

I imported those libraries; Eclipse doesn't show any compilation error. But I am getting this when I run the code:

java.lang.NoSuchMethodError: org.jfree.data.xy.XYSeries.<init>(Ljava/lang/Comparable;)V

Could someone please help me figure out what's going on? Thank you!

Upvotes: 1

Views: 274

Answers (1)

trashgod
trashgod

Reputation: 205765

Note that JCommon classes have been integrated into JFreeChart version 1.5.

When downloading old releases from here, be sure to use compatible versions: For example, the latest JFreeChart JAR, jfreechart-1.0.19, should be used with the latest JCommon JAR, jcommon-1.0.23. You should see the correct JCommon JAR in the lib folder of whichever JFreeChart you choose.

The current version can be obtained via or built as shown here.

Upvotes: 1

Related Questions