我正在按照以下链接
在karaf 4.0.3中运行一个简单的hazelcast应用程序https://darylmathison.com/2014/04/01/beginners-guide-to-hazelcast-part-1/
我能够完全编译代码,但在启动软件包时,我收到的错误如下,
2016-05-05 17:57:46,067 | ERROR | nsole user karaf | ShellUtil | 44 - org.apache.karaf.shell.core - 4.0.3 | Exception caught while executing command
org.apache.karaf.shell.support.MultiException: Error executing command on bundles:
Error starting bundle137: Unable to resolve HazelcastArtifact [137](R 137.1313): missing requirement [HazelcastArtifact [137](R 137.1313)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.meta) Unresolved requirements: [[HazelcastArtifact [137](R 137.1313)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.meta)]
at org.apache.karaf.shell.support.MultiException.throwIf(MultiException.java:61)
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:69)[24:org.apache.karaf.bundle.core:4.0.3]
at org.apache.karaf.bundle.command.BundlesCommand.execute(BundlesCommand.java:54)[24:org.apache.karaf.bundle.core:4.0.3]
at org.apache.karaf.shell.impl.action.command.ActionCommand.execute(ActionCommand.java:83)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:67)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.karaf.shell.impl.console.osgi.secured.SecuredCommand.execute(SecuredCommand.java:87)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:480)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:406)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:182)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:119)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:94)[44:org.apache.karaf.shell.core:4.0.3]
at org.apache.karaf.shell.impl.console.ConsoleSessionImpl.run(ConsoleSessionImpl.java:270)[44:org.apache.karaf.shell.core:4.0.3]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_66]
Caused by: java.lang.Exception: Error starting bundle137: Unable to resolve HazelcastArtifact [137](R 137.1313): missing requirement [HazelcastArtifact [137](R 137.1313)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.meta) Unresolved requirements: [[HazelcastArtifact [137](R 137.1313)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.meta)]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:66)[24:org.apache.karaf.bundle.core:4.0.3]
... 12 more
Caused by: org.osgi.framework.BundleException: Unable to resolve HazelcastArtifact [137](R 137.1313): missing requirement [HazelcastArtifact [137](R 137.1313)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.meta) Unresolved requirements: [[HazelcastArtifact [137](R 137.1313)] osgi.wiring.package; (osgi.wiring.package=javax.annotation.meta)]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)[org.apache.felix.framework-5.4.0.jar:]
at org.apache.karaf.bundle.command.Start.executeOnBundle(Start.java:38)[24:org.apache.karaf.bundle.core:4.0.3]
at org.apache.karaf.bundle.command.BundlesCommand.doExecute(BundlesCommand.java:64)[24:org.apache.karaf.bundle.core:4.0.3]
... 12 more
我得到了这个缺失的要求osgi.wiring.package; (osgi.wiring.package = javax.annotation.meta)一直都是。我也尝试在pom.xml文件中添加以下行,
<Import-Package>
org.osgi.framework,
osgi.wiring.package,
android.dalvik,
javax.annotation,version=1.6.0,
javax.annotation.processing,version=1.6.0
</Import-Package>
但没有多大帮助。请帮我解决这个缺失的要求osgi.wiring.package;启动捆绑包时出现(osgi.wiring.package = javax.annotation.meta)错误。
答案 0 :(得分:0)
首先检查是否还有可用的捆绑包实际上在该版本中导出此包 如果不是这样,请安装所需的包以满足此依赖关系。