Problem java.lang.NoSuchMethodError

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Brice2407
Posts: 3
Joined: Tue Apr 24, 2007 3:44 pm

Problem java.lang.NoSuchMethodError

Post by Brice2407 » Tue Apr 24, 2007 3:51 pm

Hi everyone,
I am new in JfreeChart and I have the following report error:

java.lang.NoSuchMethodError: org.jfree.ui.RectangleInsets.<init>(DDDD)V
com.pep.web.ztest36Servlet.createChart(ztest36Servlet.java:526)
com.pep.web.ztest36Servlet.processRequest(ztest36Servlet.java:294)
com.pep.web.ztest36Servlet.doGet(ztest36Servlet.java:212)
javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)

I have read on this forum that this error can occurs when Jcommon is not the oldest version, but I installed jcommon1-0-9.
Thanks a lot in advance.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Apr 25, 2007 8:28 am

Check that you have only one version of JCommon (and JFreeChart) on your classpath.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Brice2407
Posts: 3
Joined: Tue Apr 24, 2007 3:44 pm

Post by Brice2407 » Wed Apr 25, 2007 10:20 am

I think I have only one (I have deleted the old jCommon I had in the Build Path in Eclipse) but i'm not sure. How can I check that?
Thanks.

scar
Posts: 8
Joined: Wed Mar 21, 2007 12:43 pm
Location: Netherlands

Post by scar » Wed Apr 25, 2007 1:53 pm

Brice2407 wrote:How can I check that?
Maybe the 'Classpath Helper" plugin http://classpathhelper.sourceforge.net is usefull

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Wed Apr 25, 2007 6:26 pm

Hi,

JCommon (like all JFree* libraries) has an Info-class, which holds some versioning information.

Just run the main method of "org.jfree.JCommon" and you'll see what version is active. However, you still have to search the jar file for this on your own.

Have fun,
said Thomas

Brice2407
Posts: 3
Joined: Tue Apr 24, 2007 3:44 pm

Post by Brice2407 » Thu Apr 26, 2007 3:29 pm

ok, i will try that, thx for your help!!

montenegro
Posts: 2
Joined: Mon Jul 30, 2007 3:06 pm

Post by montenegro » Mon Jul 30, 2007 3:15 pm

Hi, I am having the same problem when I try to run a report with chart on the web. And there's only one version of JCommom (1.0.0) and JFreeChart(1.0.0).

I can run the chart when it isnt on the web, but on the web i cant!!

What can it be??

Thanks.

joolz
Posts: 56
Joined: Thu Nov 17, 2005 2:38 am
Location: Australia

Post by joolz » Tue Jul 31, 2007 1:19 am

Sounds like you haven't copied the jcommon library to where your webserver is running (assuming you are using servlets).

montenegro
Posts: 2
Joined: Mon Jul 30, 2007 3:06 pm

Post by montenegro » Tue Jul 31, 2007 2:01 pm

=D

The problem was not this...I think that was the version...I don't know! But now I can run the report on the web!!

Thanks

Locked