!SESSION 2014-12-23 11:57:41.015 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_32
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
Command-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 0
org.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 0
org.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的时候还是清晰明了了很多。