我正在尝试在 Apache Karaf 上放置一个项目,但出现以下错误:
org.osgi.framework.BundleException: Unresolved constraint in bundle com.acme.services.serviceA-impl [59]: Unable to resolve 59.0: missing requirement [59.0] osgi.wiring.package; (osgi.wiring.package=org.springframework.beans.factory.annotation)
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:3826)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.startBundle(Felix.java:1868)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1191)[org.apache.felix.framework-4.0.3.jar:]
at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:295)[org.apache.felix.framework-4.0.3.jar:]
at java.lang.Thread.run(Thread.java:745)[:1.7.0_60]
并且我的 Maven pom.xml 在构建部分中包含以下内容:
<Import-Package>
org.slf4j,
org.springframework.beans.factory.annotation
</Import-Package>
任何人都知道我该如何解决这个问题?