春分启动错误(控制台捆绑包丢失)

8
java.version=1.6.0_10
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
 Command-line arguments:  -console -configuration runtime

ENTRY org.eclipse.osgi 4 0 2012-03-28 15:50:09.721
 !MESSAGE Could not find bundle: org.eclipse.equinox.console
!STACK 0`enter code here`
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-03-28 15:50:09.737
!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)

这显示了如何将插件添加到运行配置中 http://www.digizol.com/2013/11/Eclipse-org-osgi-framework-BundleException-equinox-console.html - lkamal
5个回答

17
  • 进入 META-INF/MANIFEST.MF 文件

  • 右键单击 Run As/Run Configuration/RAP Application/(选择此节点下的入口点)

  • 选择 Tab Bundles/

  • 勾选 org.apache.felix.gogo.command , org.apache.felix.gogo.runtime , org.apache.felix.gogo.shell , org.eclipse.equinox.console

  • 点击 "Add Required Bundles"

  • 点击 "Validate Bundles" ==> 未发现问题

  • 应用更改.

现在可以运行了。


8
Equinox系统包中已删除控制台功能。现在需要显式安装(felix gogo console)。请下载Equinox SDK并将以下文件复制到您的equinox插件文件夹中:
- org.apache.felix.gogo.command_0.8.0.v201108120515.jar - org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar - org.apache.felix.gogo.shell_0.8.0.v201110170705.jar - org.eclipse.equinox.console_1.0.0.v20111215-1210.jar 更新配置文件夹中的config.ini,并将以下子串添加到属性osgi.bundles中:
- reference:file:org.eclipse.equinox.console_1.0.0.v20111215-1210.jar@4,reference:file:org.apache.felix.gogo.shell_0.8.0.v201110170705.jar@4,reference:file:org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar@4,reference:file:org.apache.felix.gogo.command_0.8.0.v201108120515.jar@4,

链接似乎已经失效。 - Gorky

3
这个链接提供了关于基于Apache Felix Gogo shell的新控制台的所有细节:http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Fguide%2Fconsole_shell.htm 简单来说,步骤如下:
  1. Place the necessary bundles in a folder. The bundles are:

    • org.apache.felix.gogo.command_0.8.0v<version>.jar
    • org.apache.felix.gogo.runtime_0.8.0v<version>.jar
    • org.apache.felix.gogo.shell_0.8.0v<version>.jar
    • org.eclipse.equinox.console_1.0.0v<version>.jar
    • org.eclipse.osgi.jar
  2. Create a configuration subfolder put a new config.ini file in it with the following content:

    osgi.bundles=./org.apache.felix.gogo.runtime_0.8.0v<version>.jar@start,\
    ./org.apache.felix.gogo.command_0.8.0v<version>.jar@start,\
    ./org.apache.felix.gogo.shell_0.8.0v<version>.jar@start,\
    ./org.eclipse.equinox.console.jar@start,\
    osgi.console.enable.builtin=false
    osgi.console=<port> 
    
  3. Start the Equinox framework with this command:

    java -jar org.eclipse.osgi.jar
    

2
在上述的config.ini中,osgi.console.enable.builtin=false不能与osgi.bundles属性在同一行。官方文档似乎也有这个错误。
我的config.ini看起来像:
osgi.bundles=./org.apache.felix.gogo.runtime_0.10.0.v201209301036.jar@start,\
./org.apache.felix.gogo.command_0.10.0.v201209301215.jar@start,\
./org.apache.felix.gogo.shell_0.10.0.v201212101605.jar@start,\
./org.eclipse.equinox.console.jar@start
osgi.console.enable.builtin=false
osgi.console=4711

0
必要的捆绑包丢失。 在“运行配置”->“OSGi框架”->“捆绑包”中添加它们 除了您自己的捆绑包之外,还需添加以下捆绑包并删除其他捆绑包: org.apache.felix.gogo.command_0.8.0.v201108120515.jar

org.apache.felix.gogo.runtime_0.8.0.v201108120515.jar

org.apache.felix.gogo.shell_0.8.0.v201110170705.jar

org.eclipse.equinox.console_1.0.0.v20111215-1210.jar

然后点击应用并运行。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接