1

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
Kartoch
  • 7,610
  • 9
  • 40
  • 68

1 Answers1

5

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.

Fredrik
  • 10,626
  • 6
  • 45
  • 81
  • 1
    Further to your question about whether it's the versions which are the issue, not specifying a version in the Require-Bundle means any version of the core bundle will work. The "0.0.0" in the error message is saying the same thing; any bundle with a version 0.0.0 or greater (in other words, any version at all) would do the trick. – Holly Cummins Mar 20 '12 at 18:45
  • I found the solution: i was expecting something from equinox but it clearly said `org.eclipse.core.runtime` which is part of Eclipse, not Equinox. – Kartoch Mar 20 '12 at 21:03