Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » NoClassDefFoundError when running a JUnit Plug-in Test
NoClassDefFoundError when running a JUnit Plug-in Test [message #270526] Tue, 07 September 2004 22:59 Go to next message
Eclipse UserFriend
I have two plug-in projects. The first (lets call it "com.foo") is a simple
plug-in I've written to get the hang of writting plug-ins. The second is a
JUnit Plug-in (let's call it "com.foo.test") that's written as a JUnit
Plug-in test for the com.foo Plug-in. I can successfully run the the com.foo
plug-in manually using a Run-time workbench, but when I try to test it using
the com.foo.test JUnit Plug-in (by running it as a "JUnit Plug-in Test"), I
get a NoClassDefFoundError for any and all of the classes defined in my
com.foo Plug-in. The com.foo.test code compiles fine, it just can't find the
com.foo classes at run-time.

I'm running in the 3.0 environment and I defined the com.foo.test JUnit
Plug-in to depend on the com.foo plug-in.

Why might my com.foo plug-in's classes not be found when running in the
"JUnit Plug-in Test" environment?
Re: NoClassDefFoundError when running a JUnit Plug-in Test [message #270954 is a reply to message #270526] Thu, 09 September 2004 19:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: news.karsten-becker.de

Steve Wampler wrote:

> Why might my com.foo plug-in's classes not be found when running in the
> "JUnit Plug-in Test" environment?
>
>
This is something I found recently. I'm not sure whether it solves your
Problem, but do you have your com.foo classes exported on
Plugin.xml->Runtime->Library Exporting?

Does anyone know how to select Export the entire Library? At my eclipse
this option is not selectable...

Karsten
Re: NoClassDefFoundError when running a JUnit Plug-in Test [message #270981 is a reply to message #270526] Fri, 10 September 2004 04:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: daniel.megert.gmx.net

Steve Wampler wrote:

>I have two plug-in projects. The first (lets call it "com.foo") is a simple
>plug-in I've written to get the hang of writting plug-ins. The second is a
>JUnit Plug-in (let's call it "com.foo.test") that's written as a JUnit
>Plug-in test for the com.foo Plug-in. I can successfully run the the com.foo
>plug-in manually using a Run-time workbench, but when I try to test it using
>the com.foo.test JUnit Plug-in (by running it as a "JUnit Plug-in Test"), I
>get a NoClassDefFoundError for any and all of the classes defined in my
>com.foo Plug-in. The com.foo.test code compiles fine, it just can't find the
>com.foo classes at run-time.
>
>I'm running in the 3.0 environment and I defined the com.foo.test JUnit
>Plug-in to depend on the com.foo plug-in.
>
>Why might my com.foo plug-in's classes not be found when running in the
>"JUnit Plug-in Test" environment?
>
>
>
>
If you declare a plug-in class declared in plugin.xml then verify that
this class exists and is public. Also, adding -consolelog to your launch
config's arguments might give more clues.

Dani
Re: NoClassDefFoundError when running a JUnit Plug-in Test [message #271102 is a reply to message #270954] Sat, 11 September 2004 18:07 Go to previous message
Eclipse UserFriend
Exporting my classes using "Plugin.xml->Runtime->Library Exporting" did the
trick. Thanks Karsten.

> This is something I found recently. I'm not sure whether it solves your
> Problem, but do you have your com.foo classes exported on
> Plugin.xml->Runtime->Library Exporting?
>
> Karsten
Previous Topic:Compiling JFace programs with GCJ
Next Topic:SAXParser not found when creating a jdom SAXBuilder
Goto Forum:
  


Current Time: Wed May 14 13:02:37 EDT 2025

Powered by FUDForum. Page generated in 0.03928 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top