BundleActivator Problem [message #248245] |
Wed, 02 June 2004 08:15 |
Eclipse User |
|
|
|
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 #248289 is a reply to message #248279] |
Wed, 02 June 2004 10:15 |
Eclipse User |
|
|
|
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 #248324 is a reply to message #248309] |
Wed, 02 June 2004 11:18 |
Eclipse User |
|
|
|
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?
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.25812 seconds