0

从 Karaf 缓存日志中,当我在 karaf 中部署捆绑包时,我多次收到以下错误

!ENTRY org.eclipse.jetty.jndi 4 0 2019-02-21 16:27:11.500
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.jetty.jndi [77]
  Unresolved requirement: Import-Package: javax.mail; version="[1.4.0,2.0.0)"

    at org.eclipse.osgi.container.Module.start(Module.java:444)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.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)
4

1 回答 1

1

该捆绑包org.eclipse.jetty.jndi依赖于javax.mail; version="[1.4.0,2.0.0)". 这个错误有两个原因。

  1. 没有一个 Bundle 正在导出javax.mail或主机没有将包添加javax.mail为 SYSTEM_PACKAGE。
  2. 主机已添加javax.mail为 SYSTEM_PACKAGE,但版本可能不在 1.4.0 和 2.0.0 之间。

PS:这里的主机是Equinox

于 2019-02-26T09:19:43.677 回答