gpt4 book ai didi

eclipse - bundle Y 的激活器 X 无效,由 ClassNotFoundException : X 引起

转载 作者:行者123 更新时间:2023-12-01 22:25:40 24 4
gpt4 key购买 nike

在 eclipse 中启动 OSGi 应用程序时,出现以下错误:

org.osgi.framework.BundleException: The activator org.pathvisio.sbgn.SbgnPlugin for bundle org.pathvisio.sbgn is invalid
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:157)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:751)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:370)
at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1068)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:464)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:248)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:445)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
Caused by: java.lang.ClassNotFoundException: org.pathvisio.sbgn.SbgnPlugin
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:494)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
at org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:326)
at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:150)
... 10 more

这似乎与以下问题相同: The activator for bundle is invalid

但是,无论我尝试什么,我都会遇到同样的错误。即使我将 Activator 类的名称更改为其他名称,使用旧的类名称仍然会给出完全相同的错误。

显然 eclipse 正在缓存一些东西,但我不知道是什么或为什么。我尝试重新启动 Eclipse,并重建工作区中的所有项目,但没有任何帮助。

这是我的 MANIFEST.MF:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.pathvisio.sbgn
Bundle-SymbolicName: org.pathvisio.sbgn
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: org.pathvisio.sbgn.Activator
Bundle-ClassPath: lib/activation.jar,
lib/google-collect-snapshot-20090211.jar,
lib/jaxb-api.jar,
lib/jaxb-impl.jar,
lib/jaxb-xjc.jar,
lib/jaxb1-impl.jar,
lib/jsr173_1.0_api.jar,
lib/org.sbgn.jar
Export-Package: org.pathvisio.sbgn
Require-Bundle: com.springsource.org.jdom;bundle-version="1.1.0",
org.pathvisio.core;bundle-version="2.0.11",
org.bridgedb;bundle-version="1.1.0",
org.pathvisio.gui;bundle-version="2.0.11",
org.pathvisio.desktop;bundle-version="2.0.11",
org.bridgedb.bio;bundle-version="1.1.0"
Import-Package: org.osgi.framework;version="1.5.0"

如您所见,我重命名了激活器类,但它仍然使用我之前指定的类名报告错误。

最佳答案

将 ., 添加到 Bundle-classpath 并再次检查。它应该有效。

关于eclipse - bundle Y 的激活器 X 无效,由 ClassNotFoundException : X 引起,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7638634/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com