[Eclipse] org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console - Digizol6

Post Top Ad

Responsive Ads Here

Post Top Ad

Responsive Ads Here

Wednesday, November 6, 2013

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

With latest Eclipse Kepler 4.3.1 SR1, I tried to run one of my older OSGi projects. Earlier this project was running smoothly with Eclipse Indigo (3.7.1).

However, when I tried to execute it via Eclipse Kepler version as a "OSGI Framework" configuration; I was surprised since it showed an exception as org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console .

Below is the complete stack-trace.

!SESSION date time -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments: -dev file:$Location/dev.properties -os linux
-ws gtk -arch x86 -consoleLog -console

!ENTRY org.eclipse.osgi 4 0 date time
!MESSAGE Could not find bundle: org.eclipse.equinox.console
!STACK 0
org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console
at org.eclipse.osgi.framework.internal.core.ConsoleManager.checkForConsoleBundle(ConsoleManager.java:211)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:298)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

Solution

A quick look into the details revealed that the default shell of Eclipse has been moved to "Apache Felix Gogo"; so the necessary bundles must be added to the "Run Configuration" before running. Followings are the four bundled that you need to select from the list.

org.apache.felix.gogo.command_0.10.0v<version>.jar
org.apache.felix.gogo.runtime_0.10.0v<version>.jar
org.apache.felix.gogo.shell_0.10.0v<version>.jar
org.eclipse.equinox.console_1.0.100<version>.jar

After adding these as shown in the above diagram, the program runs smoothly.

For more details on the changes on OSGi shell, please refer here.

2 comments:

  1. hey appreciate u posting this I am new to OSGI was struggling with it

    ReplyDelete
  2. Sorry to Say, but Not at all working in Eclipse LUNA ..The output is

    Hello World!!
    !SESSION 2015-04-29 14:07:23.532 -----------------------------------------------
    eclipse.buildId=unknown
    java.version=1.7.0_79
    java.vendor=Oracle Corporation
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments: -dev file:D:/Tapas/.metadata/.plugins/org.eclipse.pde.core/New_configuration/dev.properties -os win32 -ws win32 -arch x86 -consoleLog -console

    !ENTRY org.eclipse.osgi 4 0 2015-04-29 14:07:23.900
    !MESSAGE Could not find bundle: unknown
    !STACK 0
    org.osgi.framework.BundleException: Could not find bundle: unknown
    at org.eclipse.core.runtime.internal.adaptor.ConsoleManager.checkForConsoleBundle(ConsoleManager.java:58)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:331)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:231)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1438)
    osgi>

    ReplyDelete

Post Top Ad

Responsive Ads Here