启动捆绑包时缺少要求osgi.wiring.package

时间:2019-05-25 19:38:17

标签: eclipse osgi apache-karaf aries

提前感谢您的帮助! 我正在学习一个教程,当我尝试启动我安装在karaf中的捆绑软件时,它不会启动...日志是:

20:12:18.713错误[Karaf本地控制台用户karaf]执行命令时捕获到异常 org.apache.karaf.shell.support.MultiException:在捆绑软件上执行命令时出错:         启动软件包157时出错:无法解决db-examplejpa [157](R 157.0):缺少要求[db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package = org.apache.felix.service.command)(版本> = 0.6.0)(!(版本> = 1.0.0)))未解决的要求:[[db-examplejpa [157] (R 157.0)] osgi.wiring.package; (&(osgi.wiring.package = org.apache.felix.service.command)(版本> = 0.6.0)(!(版本> = 1.0.0)))]]         在org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61)〜[?:?]         在org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:70)〜[?:?]         在org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55)〜[?:?]         在org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)〜[?:?]         在org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)〜[?:?]         在org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)〜[?:?]         在org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599)〜[?:?]         在org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526)〜[?:?]         在org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415)〜[?:?]         在org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416)〜[?:?]         在org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)〜[?:?]         在org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)〜[?:?]         在java.util.concurrent.FutureTask.run(FutureTask.java:266)〜[?:?]         在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)〜[?:?]         在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)〜[?:?]         在java.lang.Thread.run(Thread.java:748)[?:?]         禁止:java.lang.Exception:启动包157时出错:无法解析db-examplejpa [157](R 157.0):缺少要求[db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package = org.apache.felix.service.command)(版本> = 0.6.0)(!(版本> = 1.0.0)))未解决的要求:[[db-examplejpa [157] (R 157.0)] osgi.wiring.package; (&(osgi.wiring.package = org.apache.felix.service.command)(版本> = 0.6.0)(!(版本> = 1.0.0)))]]                 在org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67)〜[?:?]                 在org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:55)〜[?:?]                 在org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:84)〜[?:?]                 在org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:68)〜[?:?]                 在org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:86)〜[?:?]                 在org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:599)〜[?:?]                 在org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:526)〜[?:?]                 在org.apache.felix.gogo.runtime.Closure.execute(Closure.java:415)〜[?:?]                 在org.apache.felix.gogo.runtime.Pipe.doCall(Pipe.java:416)〜[?:?]                 在org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:229)〜[?:?]                 在org.apache.felix.gogo.runtime.Pipe.call(Pipe.java:59)〜[?:?]                 在java.util.concurrent.FutureTask.run(FutureTask.java:266)〜[?:?]                 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)〜[?:?]                 在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)〜[?:?]                 在java.lang.Thread.run(Thread.java:748)[?:?]         由以下原因引起:org.osgi.framework.BundleException:无法解析db-examplejpa [157](R 157.0):缺少要求[db-examplejpa [157](R 157.0)] osgi.wiring.package; (&(osgi.wiring.package = org.apache.felix.service.command)(版本> = 0.6.0)(!(版本> = 1.0.0)))未解决的要求:[[db-examplejpa [157] (R 157.0)] osgi.wiring.package; (&(osgi.wiring.package = org.apache.felix.service.command)(版本> = 0.6.0)(!(版本> = 1.0.0)))]]                 在org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149)〜[?:?]                 在org.apache.felix.framework.Felix.startBundle(Felix.java:2119)〜[?:?]                 在org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)〜[?:?]                 在org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38)〜[?:?]                 在org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:65)〜[?:?]                 ...另外14个

如果您有兴趣,本教程就是本教程:http://liquid-reality.de/Karaf-Tutorial/06/

我认为这是versiong问题,但是我尝试在pom中更改版本,但没有成功。 我在这里似乎有一些答案,但没有运气...

编辑:我不使用bndtool btw ...是必需的吗? t子什么都没说

谢谢!

1 个答案:

答案 0 :(得分:1)

该示例不再与当前版本的Apache Karaf和JPA相匹配。

您看到的问题意味着我们使用了软件包“ org.apache.felix.service.command”,但是没有捆绑软件可以导出该软件包。在这种情况下,原因是不赞成使用此软件包中的注释,并且当前karaf版本不再支持该注释。

我已经为当前的Apache Karaf修改了示例,并转换为使用基于lambda的JPA样式以及声明性服务而非蓝图。这使示例更加简单。

我希望这会有所帮助。

相关问题