捆绑的激活器无效 [英] The activator for bundle is invalid

查看:178
本文介绍了捆绑的激活器无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在eclipse中创建一个简单的插件。当我运行应用程序时,我在日志文件中看到这个错误:

I'm trying to create a simple plugin in eclipse. When I run the application, I see this error in log file:


org.osgi.framework.BundleException:bundle $ b的激活器$ b org.xyActivator for bundle org.xy无效。

org.osgi.framework.BundleException : The activator for bundle org.x.y.Activator for bundle org.x.y is invalid.

你对这个错误有任何想法吗?

Do you have any idea about this error?

推荐答案

检查您的 build.properties 部分

如果没有正确指定什么应该是在最后的二进制结果,它不会工作。检查.class文件是MANIFEST.MF说他们将在哪里。

If it doesn't properly specify what's supposed to be in the final binary result, it will not work. Check the .class files are where the MANIFEST.MF says they will be.

from EclipseZone ,此错误消息的另一个原因:

from EclipseZone, another reason for this error message:


如果您在日志中看到消息,如

If you see a message in the log like



 The activator org.example.FooActivator for bundle org.example.foo is invalid 




,这通常意味着有一个 ClassNotFoundException 试图加载该类,首先,甚至到了start()方法之前。

, then this usually means there has been a ClassNotFoundException trying to load the class in the first place, before it's even got to the start() method.






penguru 补充说:


当我尝试从激活器类的构造函数中的任何其他类创建一个新对象时,会发生错误。在激活插件中创建对象不合法?

The error occurs when I try create a new object from any other class in the constructor of activator class. Isn't it legal to create an object in activator plugin ?



查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆