Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » NoClassDefFoundError
NoClassDefFoundError [message #459519] Mon, 04 December 2006 09:51 Go to next message
Eclipse UserFriend
Hi everybody,

I have an RCP application with several plugins. If I start the application
standalone I get the following errors.
If I define this application as a target platform in my eclipse workbench,
and start it via a start-configuration everything
works fine.

Has anyone an idea what goes wrong here?

Thanks!!!

Carsten



!ENTRY org.eclipse.ui.workbench 4 2 2006-12-04 15:38:23.665
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NoClassDefFoundError:
com/dvelop/modulelibrary/exceptions/DVModuleLibraryConnectio nFailedException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:157)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.ui.internal.views.properties.tabbed.view.TabbedP ropertyRegistry. <init>(TabbedPropertyRegistry.java:110)
at
org.eclipse.ui.internal.views.properties.tabbed.view.TabbedP ropertyRegistryFactory.createRegistry(TabbedPropertyRegistry Factory.java:69)
at
org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.initContributor(TabbedPropertySheetPage.java:390)
at
org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge. <init>(TabbedPropertySheetPage.java:279)
at
com.dvelop.ecm.processeditor.designer.ui.FlowEditor.getAdapt er(FlowEditor.java:508)
at
org.eclipse.ui.views.properties.PropertySheet.doCreatePage(P ropertySheet.java:119)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.jav a:399)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView. java:743)
at
org.eclipse.ui.views.properties.PropertySheet.partActivated( PropertySheet.java:192)
at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerL ist.java:72)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at
org.eclipse.ui.internal.PartListenerList.fireEvent(PartListe nerList.java:57)
at
org.eclipse.ui.internal.PartListenerList.firePartActivated(P artListenerList.java:70)
at
org.eclipse.ui.internal.PartService.firePartActivated(PartSe rvice.java:73)
at org.eclipse.ui.internal.PartService.setActivePart(PartServic e.java:171)
at
org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePart Changed(WorkbenchPagePartList.java:56)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java :126)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:3207)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage .java:588)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2604)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2528)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2520)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2505)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2500)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2477)
at
com.dvelop.plugins.workflowperspective.actions.NewWFLAction. execute(NewWFLAction.java:99)
at
com.dvelop.ecm.runtime.commands.ECMCommandCaller.setAndExecu teCommand(ECMCommandCaller.java:42)
at
com.dvelop.plugins.workflowperspective.actions.NewWFLAction. run(NewWFLAction.java:52)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.dvelop.ecm.basic.Application.run(Application.java:27)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)

!ENTRY org.eclipse.ui.workbench 4 2 2006-12-04 15:38:27.710
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NoClassDefFoundError:
com/dvelop/modulelibrary/exceptions/DVModuleLibraryConnectio nFailedException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI .createExecutableExtension(RegistryStrategyOSGI.java:157)
at
org.eclipse.core.internal.registry.ExtensionRegistry.createE xecutableExtension(ExtensionRegistry.java:759)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:243)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.ui.internal.views.properties.tabbed.view.TabbedP ropertyRegistry. <init>(TabbedPropertyRegistry.java:110)
at
org.eclipse.ui.internal.views.properties.tabbed.view.TabbedP ropertyRegistryFactory.createRegistry(TabbedPropertyRegistry Factory.java:69)
at
org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge.initContributor(TabbedPropertySheetPage.java:390)
at
org.eclipse.ui.views.properties.tabbed.TabbedPropertySheetPa ge. <init>(TabbedPropertySheetPage.java:279)
at
com.dvelop.ecm.processeditor.designer.ui.FlowEditor.getAdapt er(FlowEditor.java:508)
at
org.eclipse.ui.views.properties.PropertySheet.doCreatePage(P ropertySheet.java:119)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.jav a:399)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView. java:743)
at
org.eclipse.ui.views.properties.PropertySheet.partActivated( PropertySheet.java:192)
at org.eclipse.ui.internal.PartListenerList$1.run(PartListenerL ist.java:72)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at
org.eclipse.ui.internal.PartListenerList.fireEvent(PartListe nerList.java:57)
at
org.eclipse.ui.internal.PartListenerList.firePartActivated(P artListenerList.java:70)
at
org.eclipse.ui.internal.PartService.firePartActivated(PartSe rvice.java:73)
at org.eclipse.ui.internal.PartService.setActivePart(PartServic e.java:171)
at
org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePart Changed(WorkbenchPagePartList.java:56)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java :126)
at
org.eclipse.ui.internal.WorkbenchPage.setActivePart(Workbenc hPage.java:3207)
at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage .java:588)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched( WorkbenchPage.java:2604)
at
org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(Workben chPage.java:2528)
at org.eclipse.ui.internal.WorkbenchPage.access$10(WorkbenchPag e.java:2520)
at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.ja va:2505)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2500)
at
org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPa ge.java:2477)
at
com.dvelop.plugins.workflowperspective.actions.NewWFLAction. execute(NewWFLAction.java:99)
at
com.dvelop.ecm.runtime.commands.ECMCommandCaller.setAndExecu teCommand(ECMCommandCaller.java:42)
at
com.dvelop.plugins.workflowperspective.actions.NewWFLAction. run(NewWFLAction.java:52)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.dvelop.ecm.basic.Application.run(Application.java:27)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Re: NoClassDefFoundError [message #459539 is a reply to message #459519] Mon, 04 December 2006 18:51 Go to previous messageGo to next message
Eclipse UserFriend
Most likely, your DVModuleLibraryConnectionFailedException has a static reference (i.e. static type or return type/argument type of a method) which can't be resolved; and because it can't be resolved, the class that's requiring it can't be loaded either.

Check the Bundle-ClassPath for that particular bundle, especially if the exception is e.g. using a class of a library Jar.

Alex.
Re: NoClassDefFoundError [message #459626 is a reply to message #459539] Tue, 05 December 2006 02:37 Go to previous messageGo to next message
Eclipse UserFriend
Hi Alex,

my DVModuleLibraryConnectionFailedException is a simple extension of the
standard Exception class in java. Here the code.

public class DVModuleLibraryConnectionFailedException extends Exception {

/**
*
*/
private static final long serialVersionUID = -8538900001925857764L;

public DVModuleLibraryConnectionFailedException(String message){
super(message);
}
public DVModuleLibraryConnectionFailedException(String message,
Throwable cause){
super(message,cause);
}
}

The thing ist that I get a similar exception while running this code

PlatformUI.getWorkbench().getActiveWorkbenchWindow().addPers pectiveListener(new
IPerspectiveListener(){
public void perspectiveActivated(IWorkbenchPage arg0,
IPerspectiveDescriptor arg1) {
if(arg1.getId().equals(IDE_PERSPECTIVE_ID)){
try {
IViewPart view =
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().showView
("com.dvelop.plugins.resourcenavigator.ResourceNavigator",
"com.dvelop.plugins.resourcenavigator.ResourceNavigator.jpl"
,
IWorkbenchPage.VIEW_VISIBLE);
System.out.println("ResNav Plugin angefordert");
((ResourceNavigator)view).setAcceptedProjects(new
String[]{IJPLPerspectiveConstants.PROJECT});
} catch (PartInitException e) {
//do something}
}
}

public void perspectiveChanged(IWorkbenchPage arg0,
IPerspectiveDescriptor arg1, String arg2) {
}
});


Here the line with the TypeCast from ViewPart to ResourceNavigator (which is
a view part) causes the exception.

!ENTRY org.eclipse.ui.workbench 4 2 2006-12-04 17:14:51.778
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.ui.workbench".
!STACK 0
java.lang.NoClassDefFoundError:
com/dvelop/plugins/resourcenavigator/views/ResourceNavigator
at
com.dvelop.plugins.workflowperspective.WFLPerspective$1.pers pectiveActivated(WFLPerspective.java:27)
at
org.eclipse.ui.internal.PerspectiveListenerList$1.run(Perspe ctiveListenerList.java:74)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at
org.eclipse.ui.internal.PerspectiveListenerList.fireEvent(Pe rspectiveListenerList.java:58)
at
org.eclipse.ui.internal.PerspectiveListenerList.firePerspect iveActivated(PerspectiveListenerList.java:72)
at
org.eclipse.ui.internal.WorkbenchWindow.firePerspectiveActiv ated(WorkbenchWindow.java:1220)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3287)
at
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:957)
at org.eclipse.ui.internal.WorkbenchPage.access$12(WorkbenchPag e.java:941)
at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:3408)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:3406)
at org.eclipse.ui.internal.Workbench.showPerspective(Workbench. java:2080)
at
com.dvelop.plugins.workflowperspective.actions.NewWFLAction. openPerspective(NewWFLAction.java:71)
at
com.dvelop.plugins.workflowperspective.actions.NewWFLAction. execute(NewWFLAction.java:85)
at
com.dvelop.ecm.runtime.commands.ECMCommandCaller.setAndExecu teCommand(ECMCommandCaller.java:42)
at
com.dvelop.plugins.workflowperspective.actions.NewWFLAction. run(NewWFLAction.java:52)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginActi on.java:254)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPl uginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at com.dvelop.ecm.basic.Application.run(Application.java:27)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)


Carsten
Re: NoClassDefFoundError [message #459640 is a reply to message #459626] Tue, 05 December 2006 07:32 Go to previous messageGo to next message
Eclipse UserFriend
The kind of things to look for:

1) Are the classes being deployed in the bundle itself?
2) Are the classes deployed as individual .class files in the bundle, or in a nested Jar?
3) What's the Bundle-ClassPath entry in the META-INF/MANIFEST.MF?

Alex.
Re: NoClassDefFoundError [message #459646 is a reply to message #459640] Tue, 05 December 2006 09:18 Go to previous messageGo to next message
Eclipse UserFriend
Well, it seems that I searched for a problem that was none for several
hours.

I forgot to try starting the workbench with the -clean option. After doing
this everything worked fine again.
That is good, but I don
Re: NoClassDefFoundError [message #459649 is a reply to message #459646] Tue, 05 December 2006 09:51 Go to previous messageGo to next message
Eclipse UserFriend
When you start Eclipse, it will index all of the Jars and pull out the Manifest.MF for faster access the first time. If you change the Jar, but it's the same name, sometimes Eclipse doesn't notice and thus uses the same Manifest.MF as last time. This can cause problems e.g. if you discover a bug and later fix it, but your original bug will be seen for a while.

A clean fixes it and thus the manifests are re-extracted upon the next startup, with the known good version.

Of course, it might not be that but some other low-level caching attribute that's going on, but the principle is much the same.

Alex.
Re: NoClassDefFoundError [message #459653 is a reply to message #459649] Tue, 05 December 2006 10:36 Go to previous message
Eclipse UserFriend
Ok, that makes all the things more visible for me.

Thanks a lot!

Greetz,
Carsten
Previous Topic:disabling check boxes in checkboxtreeviewer
Next Topic:Generating MouseEvents
Goto Forum:
  


Current Time: Wed Mar 19 02:59:51 EDT 2025

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

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

Back to the top