org.osgi.framework.BundleException: Could not find

2019-03-10 23:36发布

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?

7条回答
淡お忘
2楼-- · 2019-03-11 00:05

one of variant is choose another java version (older then default) , eclipse old version got error when it try to run on java 9 error

sudo update-alternatives --config java

i chose java 8 and all work

查看更多
淡お忘
3楼-- · 2019-03-11 00:06

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.

查看更多
手持菜刀,她持情操
4楼-- · 2019-03-11 00:09

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 Argumentsenter image description here

查看更多
对你真心纯属浪费
5楼-- · 2019-03-11 00:10

I am using Eclipse Helios and Eclipse Juno on Ubuntu Linux. I had the same error on Eclipse Juno and I wasn't able to start Eclipse. I don't know how but my Java version was decreased to 1.5, which caused the problem.

In Eclipse Helios, Java 1.5 was causing problem, but I was able to start Eclipse. The error that appeared i Eclipse Helios was:

An internal error occurred during: "Loading Web Service DOM...".

org.eclipse.emf.ecore.util.EcoreEMap$DelegateEObjectContainmentEList

Updating the Java version to 1.7 solved the problem. I guess Eclipse Juno doesn't work with Java 1.5 :)

查看更多
在下西门庆
6楼-- · 2019-03-11 00:12

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

enter image description here

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

查看更多
虎瘦雄心在
7楼-- · 2019-03-11 00:15

Try using a new workspace. To force the workspace window prompt, you need to change the settings in Eclipse_root_dir\configuration\.settings\org.eclipse.ui.ide.prefs and set SHOW_WORKSPACE_SELECTION_DIALOG to true

查看更多
登录 后发表回答