使用Require-Bundle启动osgi包失败:org.eclipse.core.runtime;捆绑版本= QUOT; 0.0.0" [英] Start an osgi bundle failed with Require-Bundle: org.eclipse.core.runtime; bundle-version="0.0.0"

查看:1755
本文介绍了使用Require-Bundle启动osgi包失败:org.eclipse.core.runtime;捆绑版本= QUOT; 0.0.0"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



目标包是来自一组eclipse的插件,可以在这里使用:



http ://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/2.4/ rodin-2.4-dev.zip )。 p>

当我开始平分:

  $ java -jar org.eclipse。 osgi_3.7.1.R37x_v20110808-1106.jar -console 

我可以安装它

  osgi>安装文件:///path_to/rodin-2.4-dev/org.eventb.core_2.4.0.r14093.jar 
软件包ID为1

但是,当我启动它时,我有一个例外:

  osgi> start 1 
org.osgi.framework.BundleException:bundleorg.eventb.core_2.4.0.r14093 [1]
无法解析。原因:缺少约束:Require-Bundle:
org.eclipse.core.runtime; bundle-version =0.0.0

有谁知道如何解决这个错误?



也许这与bundle不包含 org.eclipse.core.runtime 版本的事实有关,因为MANIFEST.MF具有以下Require-Bundle:

  Require-Bundle:org.eclipse.core.runtime,org。 rodinp.core; visibility:= r 
eexport,org.eventb.core.ast; visibility:= reexport,org.eventb.core.seqp
rover; visibility:= reexport


解决方案

捆绑包对运行时核心有要求,因为您已经注意到。安装只是安装捆绑包,这并不意味着它是有效的。您可以通过 diag 命令来检查包的状态,即 osgi> diag 1



它需要处于状态解析才能运行。我敢打赌,它只是在为你安装的状态。检查 Dude,我的捆绑包,了解更多有关捆绑包及其状态的信息。


I'm trying to install and load an external bundle to a simple equinox application.

The targeted bundle is coming from a set of plugins for eclipse available here:

http://sourceforge.net/projects/rodin-b-sharp/files/Core_Rodin_Platform/2.4/ (rodin-2.4-dev.zip).

When I start equinox:

$ java -jar org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar -console

I can install it

osgi> install file:///path_to/rodin-2.4-dev/org.eventb.core_2.4.0.r14093.jar
Bundle id is 1

But I have an exception when I start it:

osgi> start 1
org.osgi.framework.BundleException: The bundle "org.eventb.core_2.4.0.r14093 [1]" 
  could not be resolved. Reason: Missing Constraint: Require-Bundle:  
  org.eclipse.core.runtime; bundle-version="0.0.0"

Does anyone know how to fix this error ?

Maybe it is related to the fact that the bundle does not include a org.eclipse.core.runtime version, as MANIFEST.MF has the following Require-Bundle:

Require-Bundle: org.eclipse.core.runtime,org.rodinp.core;visibility:=r
  eexport,org.eventb.core.ast;visibility:=reexport,org.eventb.core.seqp
  rover;visibility:=reexport

解决方案

The bundle has a requirement to the runtime core as you have noticed. The install just installs the bundle, it does not mean it is valid. You can check the state of the bundle through diag command, i.e, osgi> diag 1

It needs to be in state resolved to be runnable. I'd bet it is just in state installed for you. Check Dude, where's my bundle for more info on bundles and their states.

这篇关于使用Require-Bundle启动osgi包失败:org.eclipse.core.runtime;捆绑版本= QUOT; 0.0.0"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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