OSGi與equinox建立高度模組化的java系統 第六章 DS模組 遇到的問題

來源:互聯網
上載者:User
!SESSION 2014-12-23 11:57:41.015 -----------------------------------------------eclipse.buildId=unknownjava.version=1.6.0_32java.vendor=Sun Microsystems Inc.BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CNCommand-line arguments:  -dev file:D:/workspaces/.metadata/.plugins/org.eclipse.pde.core/Toast/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog -console!ENTRY org.eclipse.equinox.ds 4 0 2014-12-23 11:57:41.374!MESSAGE FrameworkEvent ERROR!STACK 0org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.ds_1.4.101.v20130813-1853 [20]" could not be resolved. Reason: Missing Constraint: Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)!ENTRY org.eclipse.equinox.util 4 0 2014-12-23 11:57:41.421!MESSAGE FrameworkEvent ERROR!STACK 0org.osgi.framework.BundleException: The bundle "org.eclipse.equinox.util_1.0.500.v20130404-1337 [19]" could not be resolved. Reason: Missing Constraint: Import-Package: org.osgi.service.cm; version="1.0.0"at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolverError(AbstractBundle.java:1332)at org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:1316)at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:323)at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:390)at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1176)at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)!ENTRY org.eclipse.osgi 4 0 2014-12-23 11:57:41.421!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.util_1.0.500.v20130404-1337.jar was not resolved.!ENTRY org.eclipse.osgi 4 0 2014-12-23 11:57:41.421!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.ds_1.4.101.v20130813-1853.jar was not resolved.!ENTRY org.eclipse.osgi 2 0 2014-12-23 11:57:41.437!MESSAGE One or more bundles are not resolved because the following root constraints are not resolved:!SUBENTRY 1 org.eclipse.osgi 2 0 2014-12-23 11:57:41.437!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.ds_1.4.101.v20130813-1853.jar was not resolved.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=OSGi/Minimum)(version=1.2))(&(osgi.ee=CDC/Foundation)(version=1.1))(&(osgi.ee=JavaSE)(version=1.4)))".!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.osgi.service.component_[1.1.0,1.3.0).!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.osgi.service.cm_1.2.0.!SUBENTRY 1 org.eclipse.osgi 2 0 2014-12-23 11:57:41.437!MESSAGE Bundle initial@reference:file:plugins/org.eclipse.equinox.util_1.0.500.v20130404-1337.jar was not resolved.!SUBENTRY 2 org.eclipse.equinox.util 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.osgi.service.cm_1.0.0.!ENTRY org.eclipse.osgi 2 0 2014-12-23 11:57:41.437!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:!SUBENTRY 1 org.eclipse.osgi 2 0 2014-12-23 11:57:41.437!MESSAGE Bundle org.eclipse.equinox.util_1.0.500.v20130404-1337 [19] was not resolved.!SUBENTRY 2 org.eclipse.equinox.util 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.osgi.service.cm_1.0.0.!SUBENTRY 1 org.eclipse.osgi 2 0 2014-12-23 11:57:41.437!MESSAGE Bundle org.eclipse.equinox.ds_1.4.101.v20130813-1853 [20] was not resolved.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.eclipse.equinox.internal.util.event_1.0.0.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.eclipse.equinox.internal.util.hash_1.0.0.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.eclipse.equinox.internal.util.pool_1.0.0.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.eclipse.equinox.internal.util.ref_1.0.0.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.eclipse.equinox.internal.util.threadpool_1.0.0.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.eclipse.equinox.internal.util.timer_1.0.0.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.437!MESSAGE Missing imported package org.osgi.service.cm_1.2.0.!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.452!MESSAGE Missing imported package org.osgi.service.component_[1.1.0,1.3.0).!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.452!MESSAGE Missing imported package org.apache.felix.scr_[1.6.0,1.7.0).!SUBENTRY 2 org.eclipse.equinox.ds 2 0 2014-12-23 11:57:41.452!MESSAGE Missing required capability Require-Capability: osgi.ee; filter="(|(&(osgi.ee=OSGi/Minimum)(version=1.2))(&(osgi.ee=CDC/Foundation)(version=1.1))(&(osgi.ee=JavaSE)(version=1.4)))".osgi> 



這是遇到的問題,很明顯看到:

<strong>Missing Constraint: Import-Package: org.eclipse.equinox.internal.util.event; version="1.0.0"</strong>
這裡就是沒有載入這個jar檔案,可是看書上的說明也沒喲要求載入這個檔案啊,網上找了很多資料基本也都是指向這個問題,後來看到一篇文章也是遇到這個問題之後的解決方案,於是我就按著他的解題報告試著載入一下,果然成功運行。

下面貼張圖說明一下:


由於剛剛接觸OSGi,真的就像老師說的一樣這個技術的學習不是直線的而是曲線,有一定的難度,從一開始看到拋出異常就害怕到後來慢慢的試著自己解決問題,尋找資料還是討論,但終歸是解決了問題,真的很開心。

雖然難了一些,但現在回頭再看剛開始接觸OSGi的時候還是清晰明了了很多。


相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.