TAGS :Viewed: 7 - Published at: a few seconds ago

[ Cannot start osgi container (equinox) within eclipse ]

I've installed Eclipse Juno Service Release 2. I'm trying to learn OSGi using the Equinox container within eclipse. However, when I try to start Equinox from the command prompt using the following code, it does not start. Can someone please let me know what is missing here?

java -jar org.eclipse.osgi_3.8.2.v20130124-134944.jar -console


Answer 1

I faced the same issue while moving from 3.5 to 3.8.2 . They changed the implementation of console which now relies on felix gogo project. You will need to start the following bundles along with standard equinox :

  1. org.eclipse.equinox.console_1.0.100.v20121001-124408.jar
  2. org.apache.felix.gogo.shell_0.10.0.v201211091412.jar
  3. org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar
  4. org.apache.felix.gogo.command_0.10.0.v201209301215.jar

You can add them to the list of bundles to start by default in the config.ini file as follows :

#contents of config.ini

Your directory structure should be

- org.eclipse.osgi_3.8.2.v20130124-134944.jar
- configuration/

Answer 2

Yep, I see the same behavior. After reading some of the beginner tutorial (yes I'm a beginner :-) at OSGi with Equinox for beginners: console, launcher and configuration I discovered that logs are sent to log files by default and to see them in stdout you need the -consoleLog paramter

java -jar org.eclipse.osgi_3.8.2.v20130124-134944.jar -console -consoleLog

Which then tells me the message

org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console

I googled that which led me to here: org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console. I didn't try it but it looks like the solution you need.