Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/haskell/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
启动osgi捆绑包失败,需要捆绑包:org.eclipse.core.runtime;捆绑包版本=“0.0.0”_Eclipse_Osgi_Equinox - Fatal编程技术网

启动osgi捆绑包失败,需要捆绑包:org.eclipse.core.runtime;捆绑包版本=“0.0.0”

启动osgi捆绑包失败,需要捆绑包:org.eclipse.core.runtime;捆绑包版本=“0.0.0”,eclipse,osgi,equinox,Eclipse,Osgi,Equinox,我正在尝试安装一个外部捆绑包并将其加载到一个简单的equinox应用程序中 目标捆绑包来自一组eclipse插件,可在以下位置获得: rodin-2.4-dev.zip 当我开始春分时: $ java -jar org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar -console 我可以安装它 osgi> install file:///path_to/rodin-2.4-dev/org.eventb.core_2.4.0.r14093.jar

我正在尝试安装一个外部捆绑包并将其加载到一个简单的equinox应用程序中

目标捆绑包来自一组eclipse插件,可在以下位置获得:

rodin-2.4-dev.zip

当我开始春分时:

$ java -jar org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar -console
我可以安装它

osgi> install file:///path_to/rodin-2.4-dev/org.eventb.core_2.4.0.r14093.jar
Bundle id is 1
但我启动时有一个例外:

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"
有人知道如何修复此错误吗

可能与捆绑包不包括org.eclipse.core.runtime版本有关,因为MANIFEST.MF具有以下必需捆绑包:

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


它需要处于解析为可运行的状态。我敢打赌它是为你安装的。查看有关捆绑包及其状态的更多信息

正如您所注意到的,bundle对运行时核心有一个需求。安装只是安装捆绑包,并不意味着它是有效的。您可以通过diag命令检查捆绑包的状态,即osgi>diag 1


它需要处于解析为可运行的状态。我敢打赌它是为你安装的。查看有关捆绑包及其状态的更多信息

关于是否是版本是问题所在的问题,在Require包中不指定版本意味着任何版本的核心包都可以工作。错误消息中的0.0.0也在说同样的话;任何版本为0.0.0或更高的捆绑包——换句话说,任何版本都可以做到。我找到了解决方案:我期待equinox带来一些东西,但它清楚地表明org.eclipse.core.runtime是eclipse的一部分,而不是equinox。进一步问到是否是版本才是问题所在,不在Require捆绑包中指定版本意味着任何版本的核心捆绑包都可以工作。错误消息中的0.0.0也在说同样的话;任何版本为0.0.0或更高的捆绑包——换句话说,任何版本都可以做到这一点。我找到了解决方案:我期待equinox带来一些东西,但它明确指出org.eclipse.core.runtime是eclipse的一部分,而不是equinox。