Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » BundleActivator Problem
BundleActivator Problem [message #248245] Wed, 02 June 2004 08:15 Go to next message
Eclipse UserFriend
Originally posted by: dirksnews.gmx.de

Hi,

I ported my application to 3.0 M9 and changed my plugin class to work as
bundle activator. Anything works fine when starting a runtime workbench
from my development workbench. When I deploy my plugins to eclipse M9
itself and start my perspective I get the following log entries. Whats
wrong here?

Thanks in advance,

Dirk

!ENTRY org.eclipse.osgi Jun 02, 2004 10:13:44.840
!MESSAGE An error occured while automatically activating bundle
com.vector.easee.adminenvironment.launcher (109).
!STACK 0
org.osgi.framework.BundleException: The activator
com.vector.easee.adminenvironment.launcher.LauncherPlugin for bundle
com.vector.easee.adminenvironment.launcher is invalid
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:158)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:933)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:421)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:293)
at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:371)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:402)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:93)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:307)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:336)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1313)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:131)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:124)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:113)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:186)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:183)
at
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(PerspectiveDescriptor.java:130)
at
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:585)
at
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:191)
at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:98)
at
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1116)
at
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:721)
at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage .java:713)
at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:2854)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:2852)
at
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.java:87)
at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:303)
at
org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:318)
at
org.eclipse.ui.actions.PerspectiveMenu$4.widgetSelected(Pers pectiveMenu.java:134)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2716)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2382)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:97)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:307)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:256)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:127)
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.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:638)
at org.eclipse.core.launcher.Main.main(Main.java:622)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IStatus
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.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:153)
... 51 more
Root exception:
java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IStatus
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.osgi.framework.internal.core.AbstractBundle.load BundleActivator(AbstractBundle.java:153)
at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleContextImpl.java:933)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.java:421)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle.java:293)
at
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseClassLoader.java:107)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleLoader.java:371)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader.java:402)
at
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(AbstractClassLoader.java:93)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader.java:307)
at
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.java:336)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBundle.java:1313)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:131)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:124)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:113)
at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:186)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java:183)
at
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(PerspectiveDescriptor.java:130)
at
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:585)
at
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:191)
at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:98)
at
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1116)
at
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:721)
at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage .java:713)
at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:2854)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
at
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:2852)
at
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.java:87)
at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:303)
at
org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:318)
at
org.eclipse.ui.actions.PerspectiveMenu$4.widgetSelected(Pers pectiveMenu.java:134)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2716)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2382)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:97)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:307)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:256)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:127)
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.basicRun(Main.java:185)
at org.eclipse.core.launcher.Main.run(Main.java:638)
at org.eclipse.core.launcher.Main.main(Main.java:622)
Re: BundleActivator Problem [message #248279 is a reply to message #248245] Wed, 02 June 2004 10:02 Go to previous messageGo to next message
ted stockwell is currently offline ted stockwellFriend
Messages: 123
Registered: July 2009
Senior Member
Does your activator have a public zero-arg constructor?

"Dirk Segelhorst" <dirksnews@gmx.de> wrote in message
news:c9k1t2$4q1$1@eclipse.org...
> Hi,
>
> I ported my application to 3.0 M9 and changed my plugin class to work as
> bundle activator. Anything works fine when starting a runtime workbench
> from my development workbench. When I deploy my plugins to eclipse M9
> itself and start my perspective I get the following log entries. Whats
> wrong here?
>
> Thanks in advance,
>
> Dirk
>
> !ENTRY org.eclipse.osgi Jun 02, 2004 10:13:44.840
> !MESSAGE An error occured while automatically activating bundle
> com.vector.easee.adminenvironment.launcher (109).
> !STACK 0
> org.osgi.framework.BundleException: The activator
> com.vector.easee.adminenvironment.launcher.LauncherPlugin for bundle
> com.vector.easee.adminenvironment.launcher is invalid
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(
AbstractBundle.java:158)
> at
>
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleConte
xtImpl.java:933)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.j
ava:421)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle
..java:293)
> at
>
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:107)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:371)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:402)
> at
>
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:93)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader
..java:307)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.jav
a:336)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBu
ndle.java:1313)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:131)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:124)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:113)
> at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:186)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java
:183)
> at
>
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(Perspec
tiveDescriptor.java:130)
> at
>
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:585
)
> at
>
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:191)
> at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:98)
> at
>
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1
116)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:
721)
> at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage .java:713)
> at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:2854)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:2852
)
> at
>
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.
java:87)
> at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:303)
> at
> org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:318)
> at
>
org.eclipse.ui.actions.PerspectiveMenu$4.widgetSelected(Pers pectiveMenu.java
:134)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2716)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2382)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:97)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:307)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:256)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:127)
> 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.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:638)
> at org.eclipse.core.launcher.Main.main(Main.java:622)
> Caused by: java.lang.NoClassDefFoundError:
org/eclipse/core/runtime/IStatus
> 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.osgi.framework.internal.core.AbstractBundle.load BundleActivator(
AbstractBundle.java:153)
> ... 51 more
> Root exception:
> java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IStatus
> 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.osgi.framework.internal.core.AbstractBundle.load BundleActivator(
AbstractBundle.java:153)
> at
>
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleConte
xtImpl.java:933)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.j
ava:421)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle
..java:293)
> at
>
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:107)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:371)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:402)
> at
>
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:93)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader
..java:307)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.jav
a:336)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBu
ndle.java:1313)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:131)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:124)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:113)
> at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:186)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java
:183)
> at
>
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(Perspec
tiveDescriptor.java:130)
> at
>
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:585
)
> at
>
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:191)
> at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:98)
> at
>
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1
116)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:
721)
> at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage .java:713)
> at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:2854)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:2852
)
> at
>
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.
java:87)
> at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:303)
> at
> org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:318)
> at
>
org.eclipse.ui.actions.PerspectiveMenu$4.widgetSelected(Pers pectiveMenu.java
:134)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2716)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2382)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:97)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:307)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:256)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:127)
> 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.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:638)
> at org.eclipse.core.launcher.Main.main(Main.java:622)
Re: BundleActivator Problem [message #248289 is a reply to message #248279] Wed, 02 June 2004 10:15 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dirksnews.gmx.de

ted stockwell wrote:
> Does your activator have a public zero-arg constructor?
>

Yes, it does. Here is the code snippet:

/**
* Constructor for LauncherPlugin.
*
*/
public LauncherPlugin()
{
super();
plugin = this;

//open the db login dialog (SWT)
[...]
}

Are there any problems with that one?
Re: BundleActivator Problem [message #248309 is a reply to message #248289] Wed, 02 June 2004 10:44 Go to previous messageGo to next message
ted stockwell is currently offline ted stockwellFriend
Messages: 123
Registered: July 2009
Senior Member
Wait a sec, that bit about opening the db login...

---------------------------

....the bundle is not yet properly 'initialized' when the constructor is
called. I'll bet that the 'db login' code is failing (probably because the
SWT classes are not yet available, or some other classloading problem) and
that is preventing Eclipse from creating your activator. Move all code in
the constructor to the start method instead, I'll bet that's the problem.


"Dirk Segelhorst" <dirksnews@gmx.de> wrote in message
news:c9k8tl$dsj$1@eclipse.org...
> ted stockwell wrote:
> > Does your activator have a public zero-arg constructor?
> >
>
> Yes, it does. Here is the code snippet:
>
> /**
> * Constructor for LauncherPlugin.
> *
> */
> public LauncherPlugin()
> {
> super();
> plugin = this;
>
> //open the db login dialog (SWT)
> [...]
> }
>
> Are there any problems with that one?
Re: BundleActivator Problem [message #248324 is a reply to message #248309] Wed, 02 June 2004 11:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dirksnews.gmx.de

Hi Ted,

i moved the code. But the result is the same (same exception in log file).

The weird thing is: running my plugins via "Run->Run As->Run-time
Workbench" works properly but having them in my eclipse plugin directory
not. I cannot understand that...

New code snippets:

/**
* Constructor for LauncherPlugin.
*
*/
public LauncherPlugin()
{
super();
plugin = this;
}

/**
* Method start.
*
* @see
org.osgi.framework.BundleActivator#start(org.osgi.framework. BundleContext)
*/
public void start(BundleContext context) throws Exception
{
super.start(context);

//open the db login dialog (SWT)
DBLoginDialog login = new DBLoginDialog(Display.getCurrent(), new
Shell(Display.getCurrent()));
login.display();
}

ted stockwell wrote:

> Wait a sec, that bit about opening the db login...
>
> ---------------------------
>
> ...the bundle is not yet properly 'initialized' when the constructor is
> called. I'll bet that the 'db login' code is failing (probably because the
> SWT classes are not yet available, or some other classloading problem) and
> that is preventing Eclipse from creating your activator. Move all code in
> the constructor to the start method instead, I'll bet that's the problem.
>
>
> "Dirk Segelhorst" <dirksnews@gmx.de> wrote in message
> news:c9k8tl$dsj$1@eclipse.org...
>
>>ted stockwell wrote:
>>
>>>Does your activator have a public zero-arg constructor?
>>>
>>
>>Yes, it does. Here is the code snippet:
>>
>> /**
>> * Constructor for LauncherPlugin.
>> *
>> */
>> public LauncherPlugin()
>> {
>> super();
>> plugin = this;
>>
>> //open the db login dialog (SWT)
>> [...]
>> }
>>
>>Are there any problems with that one?
>
>
Re: BundleActivator Problem [message #248417 is a reply to message #248245] Wed, 02 June 2004 15:53 Go to previous message
Todor Boev is currently offline Todor BoevFriend
Messages: 17
Registered: July 2009
Junior Member
Hi Dirk,
I realy have no experience in writing Eclipse plugins but I have 3+ years
experience in developing bundles for the OSGi platform. I have had my fair
share of NoClassDefFoundError's and here are first steps I'd take in fixing
the problem:

1) I'd make *really* sure that you have the org.eclipse.core.runtime package
mentioned in the Import-Package clause of the plugin bundle's MANIFEST.MF?

2) If you have that package mentioned I'd check if the IStatus interface
refers to classes/intefaces from packages you have forgotten to mention - if
this is the case the IStatus will not be loaded since all the clases it
depends on are not loaded and you'll still get the dreaded
NoClassDefFoundError.

3) By specification the OSGi platform provides some basic packages to all
Bundles like the "java.*", and "org.osgi.framework". The case might be that
Eclipse extends this behaveour by providing also the core Eclipse packages.
If this is the case you're not supposed to mention none of the core packages
in the MANIFEST.MF. However you still might try listing them there. Trying
won't hurt :P

Finally I'm guessing the reason why the plugin works when you launch it with
"Run->Run As->Run-time Workbench" is that Eclipse launches the plugin not as
a stand-alone OSGi Bundle in a dedicated ClassLoader but within an existing
ClassLoader that has all necessary packages already defined. This is
however a preaty wild guess and I won't be surprised if i'm wrong :)

Best of luck
Todor

"Dirk Segelhorst" <dirksnews@gmx.de> wrote in message
news:c9k1t2$4q1$1@eclipse.org...
> Hi,
>
> I ported my application to 3.0 M9 and changed my plugin class to work as
> bundle activator. Anything works fine when starting a runtime workbench
> from my development workbench. When I deploy my plugins to eclipse M9
> itself and start my perspective I get the following log entries. Whats
> wrong here?
>
> Thanks in advance,
>
> Dirk
>
> !ENTRY org.eclipse.osgi Jun 02, 2004 10:13:44.840
> !MESSAGE An error occured while automatically activating bundle
> com.vector.easee.adminenvironment.launcher (109).
> !STACK 0
> org.osgi.framework.BundleException: The activator
> com.vector.easee.adminenvironment.launcher.LauncherPlugin for bundle
> com.vector.easee.adminenvironment.launcher is invalid
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load BundleActivator(
AbstractBundle.java:158)
> at
>
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleConte
xtImpl.java:933)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.j
ava:421)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle
..java:293)
> at
>
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:107)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:371)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:402)
> at
>
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:93)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader
..java:307)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.jav
a:336)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBu
ndle.java:1313)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:131)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:124)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:113)
> at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:186)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java
:183)
> at
>
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(Perspec
tiveDescriptor.java:130)
> at
>
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:585
)
> at
>
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:191)
> at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:98)
> at
>
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1
116)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:
721)
> at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage .java:713)
> at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:2854)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:2852
)
> at
>
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.
java:87)
> at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:303)
> at
> org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:318)
> at
>
org.eclipse.ui.actions.PerspectiveMenu$4.widgetSelected(Pers pectiveMenu.java
:134)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2716)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2382)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:97)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:307)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:256)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:127)
> 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.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:638)
> at org.eclipse.core.launcher.Main.main(Main.java:622)
> Caused by: java.lang.NoClassDefFoundError:
org/eclipse/core/runtime/IStatus
> 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.osgi.framework.internal.core.AbstractBundle.load BundleActivator(
AbstractBundle.java:153)
> ... 51 more
> Root exception:
> java.lang.NoClassDefFoundError: org/eclipse/core/runtime/IStatus
> 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.osgi.framework.internal.core.AbstractBundle.load BundleActivator(
AbstractBundle.java:153)
> at
>
org.eclipse.osgi.framework.internal.core.BundleContextImpl.s tart(BundleConte
xtImpl.java:933)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.startWor ker(BundleHost.j
ava:421)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.star t(AbstractBundle
..java:293)
> at
>
org.eclipse.core.runtime.adaptor.EclipseClassLoader.findLoca lClass(EclipseCl
assLoader.java:107)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findLo calClass(BundleL
oader.java:371)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.findCl ass(BundleLoader
..java:402)
> at
>
org.eclipse.osgi.framework.adaptor.core.AbstractClassLoader. loadClass(Abstra
ctClassLoader.java:93)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at
>
org.eclipse.osgi.framework.internal.core.BundleLoader.loadCl ass(BundleLoader
..java:307)
> at
>
org.eclipse.osgi.framework.internal.core.BundleHost.loadClas s(BundleHost.jav
a:336)
> at
>
org.eclipse.osgi.framework.internal.core.AbstractBundle.load Class(AbstractBu
ndle.java:1313)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:131)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:124)
> at
>
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExte
nsion(ConfigurationElement.java:113)
> at org.eclipse.ui.internal.WorkbenchPlugin$1.run(WorkbenchPlugi n.java:186)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPlugin.createExtension(Work benchPlugin.java
:183)
> at
>
org.eclipse.ui.internal.registry.PerspectiveDescriptor.creat eFactory(Perspec
tiveDescriptor.java:130)
> at
>
org.eclipse.ui.internal.Perspective.loadPredefinedPersp(Pers pective.java:585
)
> at
>
org.eclipse.ui.internal.Perspective.createPresentation(Persp ective.java:191)
> at org.eclipse.ui.internal.Perspective.<init>(Perspective.java:98)
> at
>
org.eclipse.ui.internal.WorkbenchPage.createPerspective(Work benchPage.java:1
116)
> at
>
org.eclipse.ui.internal.WorkbenchPage.busySetPerspective(Wor kbenchPage.java:
721)
> at org.eclipse.ui.internal.WorkbenchPage.access$8(WorkbenchPage .java:713)
> at org.eclipse.ui.internal.WorkbenchPage$12.run(WorkbenchPage.j ava:2854)
> at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:69)
> at
>
org.eclipse.ui.internal.WorkbenchPage.setPerspective(Workben chPage.java:2852
)
> at
>
org.eclipse.ui.internal.ChangeToPerspectiveMenu.run(ChangeTo PerspectiveMenu.
java:87)
> at org.eclipse.ui.actions.PerspectiveMenu.run(PerspectiveMenu.j ava:303)
> at
> org.eclipse.ui.actions.PerspectiveMenu.runOther(PerspectiveM enu.java:318)
> at
>
org.eclipse.ui.actions.PerspectiveMenu$4.widgetSelected(Pers pectiveMenu.java
:134)
> at
org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:89)
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2716)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2382)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1363)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1334)
> at
>
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:253)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:141)
> at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:97)
> at
>
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.
java:307)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:256)
> at
>
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:127)
> 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.basicRun(Main.java:185)
> at org.eclipse.core.launcher.Main.run(Main.java:638)
> at org.eclipse.core.launcher.Main.main(Main.java:622)
Previous Topic:How to configure Jikes
Next Topic:TableCursor breaks JFace CellEditors
Goto Forum:
  


Current Time: Wed Jun 26 20:02:08 GMT 2024

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

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

Back to the top