Bundle Osgi无效

时间:2015-10-09 13:03:36

标签: java osgi

我新启动osgi ..我的项目正在运行java应用程序但没有运行osgi。 问题:

org.osgi.framework.BundleException: The activator osgi.Activator for
bundle osgi is invalid at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:172) at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679) at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390) at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1) at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: java.lang.ClassCastException: osgi.Activator cannot be cast
to org.osgi.framework.BundleActivator at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:167)
  ... 12 more Root exception: java.lang.ClassCastException:
osgi.Activator cannot be cast to org.osgi.framework.BundleActivator at
org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:167) at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679) at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381) at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390) at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438) at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1) at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

1 个答案:

答案 0 :(得分:0)

org.osgi.framework.BundleException: The activator osgi.Activator for
bundle osgi is invalid at
[...]
Caused by: java.lang.ClassCastException: osgi.Activator cannot be cast
to org.osgi.framework.BundleActivator at

您的osgi.Activator类似乎已注册为Activator但未实现org.osgi.framework.BundleActivator