首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >启动捆绑包时缺少需求osgi.wiring.package

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

Stack Overflow用户
提问于 2019-05-26 03:38:17
回答 1查看 1.7K关注 0票数 2

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

20:12:18.713错误Karaf本地控制台用户在执行命令时捕获到karaf异常在捆绑包上执行命令时出错:启动捆绑包错误157:无法解析db-examplejpa 157:缺少要求[db-examplejpa 157] osgi.wiring.package;karaf未解决的要求:[[db-examplejpa 157] osgi.wiring.package;org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61)上的(&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0)))] ~?:?在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:缺少要求[db-examplejpa 157] osgi.wiring.package;未解决的要求:[[db-examplejpa 157] osgi.wiring.package;org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:67)上的(&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0)))] ~?:?在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) ?:?原因:(&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0))):无法解析db-examplejpa 157:缺少要求[db-examplejpa 157] osgi.wiring.package;未解决的要求:[[db-examplejpa 157] osgi.wiring.package;org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4149)上的(&(osgi.wiring.package=org.apache.felix.service.command)(version>=0.6.0)(!(version>=1.0.0)))] ~?:?在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/

我认为这是版本问题,但我试图在pom中更改版本,但它不起作用。我似乎在这里找到了一些答案,但没有运气...

编辑:我没有使用bndtool btw...这是必需的吗?tut对此只字不提

谢谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-05-26 16:54:27

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

您看到的问题意味着我们使用了一个包"org.apache.felix.service.command“,但是没有包导出这个包。在这种情况下,原因是来自此包的注释已被弃用,并且不再受当前karaf版本的支持。

我已经为当前的Apache Karaf调整了示例,并转换为使用基于lambda的JPA样式以及声明性服务,而不是蓝图。这使得示例变得相当简单。

我希望这能帮到你。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56308114

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档