[英]Maven : org.osgi.framework.BundleException: Unresolved constraint in bundle
[英]org.osgi.framework.BundleException: Could not find bundle: org.eclipse.equinox.console
命令:
\eclipse-SDK-4.2RC3-win32-x86_64_001\eclipse\plugins>java -jar org.eclipse.osgi_3.8.0.v20120529-1548.jar -console
異常(來自日志文件)
!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)
但是以下的罐子是可用的。
org.eclipse.equinox.console_1.0.0.v20120522-1841.jar
有關上述錯誤的任何建議?
您需要安裝幾個軟件包才能使用控制台,如果只使用java -jar ...
啟動Equinox java -jar ...
那么您將無法獲得這些軟件包。
實現此功能的最快方法是使用以下內容創建名為configuration/config.ini
的文件:
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
注意,您必須根據實際情況查看這些捆綁包的版本號。 我嘗試使用SDK-4.2M6,其中一些可能在RC3中發生了變化。
在新版本的equinox中,內置的OSGi shell已被替換為felix gogo shell。 如果你想使用新的shell,你必須放置gogo jar,並在配置文件中定義它們。
但是,如果你喜歡OSGi Equinox shell,你只需要在config.ini
文件中添加以下行來使用它: osgi.console.enable.builtin=true
。 在這種情況下,無需添加額外的罐子或任何配置。
這是因為Eclipse的默認shell已被移動到“Apache Felix Gogo”; 因此必須在運行之前將必要的包添加到“運行配置”中。 以下是您需要從列表中選擇的四個捆綁:
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
如上圖所示添加這些后,程序運行順暢。
參考: http : //www.digizol.com/2013/11/Eclipse-org-osgi-framework-BundleException-equinox-console.html
我有同樣的問題,我試圖在config.ini文件中添加osgi.console.enable.builtin=true
但似乎每次運行項目時都會重新創建文件,我解決問題的方式運行配置 - >參數選項卡在VM參數中添加-Dosgi.console.enable.builtin=true
我在Ubuntu Linux上使用Eclipse Helios和Eclipse Juno。 我在Eclipse Juno上遇到了同樣的錯誤,我無法啟動Eclipse。 我不知道如何,但我的Java版本減少到1.5,這導致了問題 。
在Eclipse Helios中,Java 1.5引起了問題,但我能夠啟動Eclipse。 Eclipse Helios出現的錯誤是:
An internal error occurred during: "Loading Web Service DOM...".
org.eclipse.emf.ecore.util.EcoreEMap$DelegateEObjectContainmentEList
將Java版本更新為1.7解決了這個問題 。 我猜Eclipse Juno不適用於Java 1.5 :)
嘗試使用新工作區。 要強制工作區窗口提示,您需要更改Eclipse_root_dir\\configuration\\.settings\\org.eclipse.ui.ide.prefs
設置並將SHOW_WORKSPACE_SELECTION_DIALOG
設置為true
其中一個變種是選擇另一個java版本 (早於默認值),eclipse舊版本在嘗試運行java 9錯誤時出錯
sudo update-alternatives --config java
我選擇了java 8並且所有工作
轉到Eclipse_root_dir\\configuration\\.settings\\org.eclipse.ui.ide.prefs
並將RECENT_WORKSPACES
路徑RECENT_WORKSPACES
為某個不同的路徑。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.