java.lang.NoClassDefFoundError: when using chartComposite

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
userkevin41
Posts: 4
Joined: Thu May 14, 2009 6:29 am

java.lang.NoClassDefFoundError: when using chartComposite

Post by userkevin41 » Thu May 14, 2009 6:45 am

Hi, when I try to use chartComposite I get the error

Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/events/PaintListener
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at Main.main(Main.java:106)


Anybody have any ideas on what the problem could be? Thanks!

userkevin41
Posts: 4
Joined: Thu May 14, 2009 6:29 am

Re: java.lang.NoClassDefFoundError: when using chartComposite

Post by userkevin41 » Fri May 15, 2009 9:56 am

edit

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

Re: java.lang.NoClassDefFoundError: when using chartComposite

Post by david.gilbert » Fri May 15, 2009 11:20 am

Most likely the SWT version. Which version are you using?

I haven't looked at the SWT code in a while, since I don't use SWT myself. But I'm hoping to go through it again soon, ensure it is in a reasonably sane state, and document it better.
David Gilbert
JFreeChart Project Leader

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

userkevin41
Posts: 4
Joined: Thu May 14, 2009 6:29 am

Re: java.lang.NoClassDefFoundError: when using chartComposite

Post by userkevin41 » Sat May 16, 2009 2:05 am

I am using SWT 3.4 Final Release - 19 June 2008, so it is the newest version other than the non-stable version. Could it have anything to do with the fact that I added it to my project build path as a required project in eclipse by selecting the zip file I received when downloading SWT? Thanks.

ashwati
Posts: 2
Joined: Wed Aug 11, 2010 3:11 pm
antibot: No, of course not.

Re: java.lang.NoClassDefFoundError: when using chartComposite

Post by ashwati » Wed Aug 11, 2010 3:18 pm

You can add the required dependency (for the PaintListener class you have to add 'org.swt.eclipse') inside the manifest file for the JFreeChart plugin in your RCP application and this error should go away.

Ashwati Sadanandan

Locked