[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Strange NoClassDefFoundError

Jochen wrote:
Hi,

I have a strange NoClassDefFoundError with my plugin.
The plugin loads fine with Eclipse, when I open the run configuration provided by the plugin I get the proper dialogs and everything, but when I try to "Run" the run-configuration I get the NoClassDefFoundError for the class that "Run" delegates to.
I'm a bit stumped by this, because obviously Eclipse finds some of the classes in my plugin, but not others.


Possibly relevant bits of my plugin.xml:

  <runtime>
      <library name="muclipse.jar">
         <export name="*"/>
      </library>
   </runtime>


<extension point="org.eclipse.debug.core.launchConfigurationTypes"> <launchConfigurationType

sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"

            delegate="edu.ncsu.muclipse.launch.MutantsLaunchConfigType"

sourcePathComputerId="org.eclipse.jdt.launching.sourceLookup.javaSourcePathComputer"

            name="MuClipse: Mutants"
            id="MuClipse.MutantsLaunchConfigType"
            modes="run,debug">
      </launchConfigurationType>
   </extension>

The JAR contains all the classes (it really does contain the class Eclipse complains about) and it finds the delegate for the LaunchConfigType without problems.
I've also tried to add the bin/ directory unpacked instead of as a JAR, but that did not change the behavior.


Is there some interference with different classloaders or am I missing something substantial here?

Thanks,
Jochen

So if I get it right, you are writing a plugin for the IDE. Now this JAR (muclipse.jar) is a just a jar or a plugin itself? If its a plguin, you should be adding it as a "dependency" rather than an external library. But if its just a java jar then i hope you are adding it through manifest editor -> build page -> Extra Classpath entries.

Other than this I can't think why you should be seeing this exception. Check the "Java Build Path" properties page once of any access restrictions (I doubt there'll be any).

hth,
Ankur..