NoClassDefFoundError: org/apache/log4j/Logger

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

NoClassDefFoundError: org/apache/log4j/Logger

Post by tohi » Tue May 25, 2004 4:05 pm

Hi,

I got the documentation for JFreeChart and trying to compile and run the First example. I can compile but I get the following error when running First:

NoClassDefFoundError: org/apache/log4j/Logger

I do have log4j-1.2.8.jar in my class path...

Please help

tohi

Mimil
JFreeReport Staff Member
Posts: 69
Joined: Tue Mar 25, 2003 7:33 pm

Post by Mimil » Tue May 25, 2004 8:13 pm

Hi,

Are you sure that your classpath is set correctly? (perhaps you have to set it in your IDE too, if you are using one)
Else can you tell us on which file it happened?

Bye,
Mimil

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 » Tue May 25, 2004 10:24 pm

I think your classpath must be wrong...but post the full exception text and see if that gives any further clues.
David Gilbert
JFreeChart Project Leader

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

arieljake

NoClassDefFoundError: org/jfree/util/PublicCloneable

Post by arieljake » Thu May 27, 2004 8:18 pm

I put the jfreechart and jcommon jar files in my j2sdk/lib directory, and was able to compile and run a simple program that simply created a CategoryDataset object.

However, when I added the command to use ChartFactory to create a chart, I am now getting the error in the subject line.

Why would the runtime environment be able to see the jfreechart jar file but not the jcommon jar file?

rshapiro@capevisions.com

java.lang.NoClassDefFoundError: org/apache/log4j/Logger

Post by rshapiro@capevisions.com » Fri May 28, 2004 6:26 pm

If you look at the trace you will see
at org.jfree.chart.plot.PiePlot.<clinit>(PiePlot.java:309)
at org.jfree.chart.ChartFactory.createPieChart(ChartFactory.java:201)

and the line in PiePlot is:
static { }

Is this the error?
What should it be?

Does the jar file jfreechart-0.9.18.jar have to be rebuilt?

I just downloaded JFreeChart (May 28,2004)
Thanks,
Robert Shapiro

Locked