Command :
\eclipse-SDK-4.2RC3-win32-x86_64_001\eclipse\plugins>java -jar org.eclipse.osgi_3.8.0.v20120529-1548.jar -console
Exception (from Log files)
!SESSION 2012-06-22 23:36:27.649 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_25
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments: -console
!ENTRY org.eclipse.osgi 4 0 2012-06-22 23:36:28.632
!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:297)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:151)
!ENTRY org.eclipse.osgi 4 0 2012-06-22 23:36:28.663
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(EclipseStarter.java:151)
But the following jar is avaialble.
org.eclipse.equinox.console_1.0.0.v20120522-1841.jar
Any suggestions on the above error?
You need a couple of bundles installed in order to use the console, and if you launch Equinox using just java -jar ...
then you will not get those bundles.
The quickest way to get this working is to create a file named configuration/config.ini
with the following content:
osgi.bundles=file\:org.eclipse.equinox.console_1.0.0.v20111215-1210.jar@start,file:\org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar@start,file:\org.apache.felix.gogo.shell_0.8.0.v201110170705.jar@start
NB you will have to review the version numbers of those bundles against what you actually have. I tried this with SDK-4.2M6, it's possible that some of these have changed in RC3.
In the new versions of equinox the built-in OSGi shell has been replaced to the felix gogo shell. If you want to use the new shell you have to place the gogo jars, and define them in your config file.
But, if you liked the OSGi Equinox shell you just have to add the following line to your config.ini
file to use it: osgi.console.enable.builtin=true
. In this case no need to add extra jars or any configuration.
This is because 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.
Reference: http://www.digizol.com/2013/11/Eclipse-org-osgi-framework-BundleException-equinox-console.html
I had the same problem I've tried to add osgi.console.enable.builtin=true
in the config.ini file but it seems that the file get recreated every time I run project the way I solve the problem Run Configurations --> Arguments tab add -Dosgi.console.enable.builtin=true
in the VM Arguments
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With