Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » cannot load a class at runtime / REWARD OFFERED... :)
cannot load a class at runtime / REWARD OFFERED... :) [message #235603] Wed, 06 September 2006 09:46 Go to next message
Eclipse UserFriend
Hi / here is a previous post, I am still lost on this one...

I will happily send a reward for first clue that gets me unstuck...

....you get to pick one of:
(1) the music CD of your choice from Amazon
(2) a frisbee, but, like, a nice frisbee or
(3) a really good Russian novel.


Here is the problem:

I cannot load org.eclipse.debug.core.DebugPlugin at runtime.

Here is a simple code sample that refers to DebugPlugin:

============================================================

DebugPlugin dpi = DebugPlugin.getDefault();

MessageDialog.openInformation(
window.getShell(),
"HelloDebug Plug-in",
dpi.toString());

============================================================ =

1. if I make a Hello World plugin and insert this code, it works fine,
both running under the debugger and deployed in a JAR under a clean copy
of Eclipse.


2. if I insert the code into the plugin that I am actually developing...

2.1 it works fine under the debugger.

2.2 when deployed in a JAR, I get the runtime error:

java.lang.NoClassDefFoundError: org/eclipse/debug/core/DebugPlugin



3. ...but under the very same session the Hello World example still
works fine.


So I must have done something that causes the class loader to fail at
runtime in my plugin only... any idea what that might have been?

It loads hundreds of other classes, this is the only failure.

(thanks)

-- Michael
Re: cannot load a class at runtime / REWARD OFFERED... :) [message #235610 is a reply to message #235603] Wed, 06 September 2006 09:51 Go to previous messageGo to next message
Eclipse UserFriend
How different is the MANIFEST of your plugin from your helloworld plugin?

Headers I'd look at: Bundle-ClassPath and Require-Bundle

Later,
PW
Re: cannot load a class at runtime / REWARD OFFERED... :) [message #235616 is a reply to message #235610] Wed, 06 September 2006 10:04 Go to previous messageGo to next message
Eclipse UserFriend
Paul Webster wrote:
> How different is the MANIFEST of your plugin from your helloworld plugin?
>
> Headers I'd look at: Bundle-ClassPath and Require-Bundle
>
> Later,
> PW

Both manifests include the dependency on org.eclipse.debug.core (which
is the only reason I can compile in both cases). My plugin has a
dependency on another of my plugins (com.mka.core, listed last).

Here are both manifests:


============================================================ =================
HELLO WORLD MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Launcher Plug-in
Bundle-SymbolicName: com.mka.launcher; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.mka.launcher.Activator
Bundle-Vendor: MKA
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.debug.core
Eclipse-LazyStart: true


============================================================ =================
HELLO WORLD MANIFEST.MF

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Editors Plug-in
Bundle-SymbolicName: com.mka.ui.editors; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.mka.ui.editors.EditorsPlugin
Bundle-Vendor: MKA
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui.ide,
org.eclipse.ui,
org.eclipse.core.resources,
org.eclipse.core.runtime,
org.eclipse.jface,
org.eclipse.debug.core,
com.mka.core
Eclipse-LazyStart: true
Eclipse-BuddyPolicy: registered
Export-Package: com.mka.ui.dialogs,
com.mka.ui.editors,
com.mka.ui.editors.actions,
com.mka.ui.editors.capproject,
com.mka.ui.editors.cashflow,
com.mka.ui.editors.collateral,
com.mka.ui.editors.views,
com.mka.ui.perspectives
Re: cannot load a class at runtime / REWARD OFFERED... :) [message #235623 is a reply to message #235616] Wed, 06 September 2006 10:12 Go to previous messageGo to next message
Eclipse UserFriend
Michael Megliola wrote:
>
> ============================================================ =================
>
> HELLO WORLD MANIFEST.MF
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Editors Plug-in
> Bundle-SymbolicName: com.mka.ui.editors; singleton:=true
> Bundle-Version: 1.0.0
> Bundle-Activator: com.mka.ui.editors.EditorsPlugin
> Bundle-Vendor: MKA
> Bundle-Localization: plugin
> Require-Bundle: org.eclipse.ui.ide,
> org.eclipse.ui,
> org.eclipse.core.resources,
> org.eclipse.core.runtime,
> org.eclipse.jface,
> org.eclipse.debug.core,
> com.mka.core
> Eclipse-LazyStart: true
> Eclipse-BuddyPolicy: registered
> Export-Package: com.mka.ui.dialogs,
> com.mka.ui.editors,
> com.mka.ui.editors.actions,
> com.mka.ui.editors.capproject,
> com.mka.ui.editors.cashflow,
> com.mka.ui.editors.collateral,
> com.mka.ui.editors.views,
> com.mka.ui.perspectives

OK, what does the manifest for com.mka.core look like?

Also, you are getting the java.lang.NoClassDefFoundError:
org/eclipse/debug/core/DebugPlugin in the error log, correct?

What are the full stack traces for the first 3 errors in your error log?

Later,
PW
Re: cannot load a class at runtime / REWARD OFFERED... :) [message #235637 is a reply to message #235623] Wed, 06 September 2006 10:41 Go to previous messageGo to next message
Eclipse UserFriend
Paul Webster wrote:
>
> OK, what does the manifest for com.mka.core look like?
>
> Also, you are getting the java.lang.NoClassDefFoundError:
> org/eclipse/debug/core/DebugPlugin in the error log, correct?
>
> What are the full stack traces for the first 3 errors in your error log?
>
> Later,
> PW

===========================================================
MANIFEST.MF for com.mka.core

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Core Plug-in
Bundle-SymbolicName: com.mka.core; singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: com.mka.core.CorePlugin
Bundle-Vendor: MKA
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.jdt.core,
org.eclipse.ui.ide,
org.eclipse.jdt.launching,
org.eclipse.debug.core
Eclipse-AutoStart: true
Export-Package: com.mka.core,
com.mka.core.analytics,
com.mka.core.analytics.structures,
com.mka.core.calendar,
com.mka.core.fileops,
com.mka.core.util
Eclipse-BuddyPolicy: registered



============================================================ =======================
SECOND ERROR / STACK TRACE

Unhandled event loop exception

An exception stack trace is not available.



============================================================ =======================
FIRST ERROR / STACK TRACE

org/eclipse/debug/core/DebugPlugin

java.lang.NoClassDefFoundError: org/eclipse/debug/core/DebugPlugin
at
com.mka.ui.editors.capproject.CapProjectPropertiesEditor.lau nchDealViewer(CapProjectPropertiesEditor.java:602)
at
com.mka.ui.editors.capproject.CapProjectPropertiesEditor.wid getSelected(CapProjectPropertiesEditor.java:593)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:925)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:949)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:934)
at org.eclipse.swt.widgets.Link.WM_LBUTTONUP(Link.java:786)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:3280 )
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023 )
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:18 79)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2964)
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:143)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
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:376)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
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: cannot load a class at runtime / REWARD OFFERED... :) [message #235649 is a reply to message #235637] Wed, 06 September 2006 11:02 Go to previous messageGo to next message
Eclipse UserFriend
Michael Megliola wrote:
>
> ===========================================================
> MANIFEST.MF for com.mka.core
>

This manifest looks fine as well.


>
> FIRST ERROR / STACK TRACE
>
> org/eclipse/debug/core/DebugPlugin
>
> java.lang.NoClassDefFoundError: org/eclipse/debug/core/DebugPlugin
> at
> com.mka.ui.editors.capproject.CapProjectPropertiesEditor.lau nchDealViewer(CapProjectPropertiesEditor.java:602)
>
> at
> com.mka.ui.editors.capproject.CapProjectPropertiesEditor.wid getSelected(CapProjectPropertiesEditor.java:593)


There are only the 2 errors in your error log? "Unhandled event loop
exception" and the NCDFE?

Later,
PW
Re: cannot load a class at runtime / REWARD OFFERED... :) [message #235664 is a reply to message #235649] Wed, 06 September 2006 11:22 Go to previous messageGo to next message
Eclipse UserFriend
>
>
> There are only the 2 errors in your error log? "Unhandled event loop
> exception" and the NCDFE?
>
> Later,
> PW
>

Yes, just those two. both are thrown by org.eclipse.ui.
Re: cannot load a class at runtime / REWARD OFFERED... :) [message #235671 is a reply to message #235616] Wed, 06 September 2006 12:02 Go to previous messageGo to next message
Eclipse UserFriend
Michael Megliola wrote:

> Paul Webster wrote:
>
>> How different is the MANIFEST of your plugin from your helloworld
>> plugin?
>>
>> Headers I'd look at: Bundle-ClassPath and Require-Bundle
>>
>> Later,
>> PW
>
>
> Both manifests include the dependency on org.eclipse.debug.core (which
> is the only reason I can compile in both cases). My plugin has a
> dependency on another of my plugins (com.mka.core, listed last).

The manifest looks OK, but the build.properties might be wrong (a common
error is to forget the '.' in bin.includes) and hence the JARed plug-in
is not OK. Make sure to enable al PDE compiler detection rules and try this:

1. select your plug-in
2. PDE Tools > Organize Manifests...
3. check all options
4. press Finish

Now check whether somethings changed in your manifest or build.properties.

HTH
Dani

>
> Here are both manifests:
>
>
> ============================================================ =================
>
> HELLO WORLD MANIFEST.MF
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Launcher Plug-in
> Bundle-SymbolicName: com.mka.launcher; singleton:=true
> Bundle-Version: 1.0.0
> Bundle-Activator: com.mka.launcher.Activator
> Bundle-Vendor: MKA
> Bundle-Localization: plugin
> Require-Bundle: org.eclipse.ui,
> org.eclipse.core.runtime,
> org.eclipse.debug.core
> Eclipse-LazyStart: true
>
>
> ============================================================ =================
>
> HELLO WORLD MANIFEST.MF
>
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Editors Plug-in
> Bundle-SymbolicName: com.mka.ui.editors; singleton:=true
> Bundle-Version: 1.0.0
> Bundle-Activator: com.mka.ui.editors.EditorsPlugin
> Bundle-Vendor: MKA
> Bundle-Localization: plugin
> Require-Bundle: org.eclipse.ui.ide,
> org.eclipse.ui,
> org.eclipse.core.resources,
> org.eclipse.core.runtime,
> org.eclipse.jface,
> org.eclipse.debug.core,
> com.mka.core
> Eclipse-LazyStart: true
> Eclipse-BuddyPolicy: registered
> Export-Package: com.mka.ui.dialogs,
> com.mka.ui.editors,
> com.mka.ui.editors.actions,
> com.mka.ui.editors.capproject,
> com.mka.ui.editors.cashflow,
> com.mka.ui.editors.collateral,
> com.mka.ui.editors.views,
> com.mka.ui.perspectives
Re: cannot load a class at runtime / REWARD OFFERED... :) [message #235677 is a reply to message #235671] Wed, 06 September 2006 13:03 Go to previous messageGo to next message
Eclipse UserFriend
>
> The manifest looks OK, but the build.properties might be wrong (a common
> error is to forget the '.' in bin.includes) and hence the JARed plug-in
> is not OK. Make sure to enable al PDE compiler detection rules and try
> this:
>
> 1. select your plug-in
> 2. PDE Tools > Organize Manifests...
> 3. check all options
> 4. press Finish
>
> Now check whether somethings changed in your manifest or build.properties.
>
> HTH
> Dani
>


that had no effect -- here are the build.properties:


============================================================ ====
build.properties for com.mka.EditorsPlugin

source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
icons/


============================================================ ====
build.properties for com.mka.CorePlugin

source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
icons/
Re: cannot load a class at runtime / REWARD OFFERED... (we have 2 winners) [message #235739 is a reply to message #235677] Thu, 07 September 2006 21:33 Go to previous message
Eclipse UserFriend
OK, here is what I did --

-- went to a different pc
-- installed a clean eclipse 3.2
-- imported my source code
-- cleaned up the build configs
-- installed another clean eclipse
-- built to that location
.. now it's OK.

(so I cause some subtle misconfiguration somewhere)

I really appreciate the help that I get from both of you --

-- write to me off list to claim your prize: michael.megliola@gmail.com
Previous Topic:debugger using old class file
Next Topic:Updating ASTNode when the AST changes
Goto Forum:
  


Current Time: Tue Jul 22 15:35:31 EDT 2025

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

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

Back to the top