我想將Spring MVC Web應用程序部署到Sling OSGi容器。我遵循本指南 http://www.jasonday.net/content/running-spring-mvc-sling#configure-slingdispatcherservlet-sling-aware。解決Sling OSGi容器中的依賴關係錯誤
但是,當我將jar文件部署到Sling OSGi Container時,我的包不是'Active'(它只是'Installed'),我發現根本原因是某些依賴關係未解決。
javax.annotation,version=[1.0,2) -- Cannot be resolved
javax.inject,version=[1.0,2) -- Cannot be resolved
net.sf.cglib.beans,version=[2.2,3) -- Cannot be resolved
net.sf.cglib.core,version=[2.2,3) -- Cannot be resolved
net.sf.cglib.proxy,version=[2.2,3) -- Cannot be resolved
net.sf.cglib.reflect,version=[2.2,3) -- Cannot be resolved
net.sf.cglib.transform,version=[2.2,3) -- Cannot be resolved
net.sf.cglib.transform.impl,version=[2.2,3) -- Cannot be resolved
net.sf.cglib.util,version=[2.2,3) -- Cannot be resolved
org.aopalliance.aop,version=[1.0,2) -- Cannot be resolved
org.aopalliance.intercept,version=[1.0,2) -- Cannot be resolved
org.apache.commons.codec,version=[1.5,2) -- Cannot be resolved
org.apache.commons.codec.binary,version=[1.5,2) -- Cannot be resolved
org.apache.commons.lang,version=[2.6,3) -- Cannot be resolved
org.apache.commons.lang.builder,version=[2.6,3) -- Cannot be resolved
org.apache.commons.lang.math,version=[2.6,3) -- Cannot be resolved
org.apache.commons.lang.time,version=[2.6,3) -- Cannot be resolved
org.aspectj.lang,version=[1.6,2) -- Cannot be resolved
org.aspectj.lang.annotation,version=[1.6,2) -- Cannot be resolved
org.objectweb.asm,version=[3.2,4) -- Cannot be resolved
org.objectweb.asm.signature,version=[3.2,4) -- Cannot be resolved
org.springframework.aop,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.aspectj,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.aspectj.annotation,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.aspectj.autoproxy,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.config,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.framework,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.framework.adapter,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.framework.autoproxy,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.framework.autoproxy.target,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.interceptor,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.scope,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.support,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.support.annotation,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.target,version=[3.0,4) -- Cannot be resolved
org.springframework.aop.target.dynamic,version=[3.0,4) -- Cannot be resolved
org.springframework.beans,version=[3.0,4) -- Cannot be resolved
org.springframework.beans.factory,version=[3.0,4) -- Cannot be resolved
org.springframework.beans.factory.annotation,version=[3.0,4) -- Cannot be resolved
org.springframework.beans.factory.config,version=[3.0,4) -- Cannot be resolved
org.springframework.context,version=[3.0,4) -- Cannot be resolved
org.springframework.context.annotation,version=[3.0,4) -- Cannot be resolved
org.springframework.context.support,version=[3.0,4) -- Cannot be resolved
org.springframework.core,version=[3.0,4) -- Cannot be resolved
org.springframework.core.io,version=[3.0,4) -- Cannot be resolved
org.springframework.expression,version=[3.0,4) -- Cannot be resolved
org.springframework.osgi.extensions.annotation,version=[1.2,2) -- Cannot be resolved
org.springframework.osgi.web.context.support,version=[1.2,2) -- Cannot be resolved
org.springframework.stereotype,version=[3.0,4) -- Cannot be resolved
org.springframework.util,version=[3.0,4) -- Cannot be resolved
org.springframework.web.bind.annotation,version=[3.0,4) -- Cannot be resolved
org.springframework.web.bind.support,version=[3.0,4) -- Cannot be resolved
org.springframework.web.context,version=[3.0,4) -- Cannot be resolved
org.springframework.web.context.request,version=[3.0,4) -- Cannot be resolved
org.springframework.web.context.support,version=[3.0,4) -- Cannot be resolved
org.springframework.web.servlet,version=[3.0,4) -- Cannot be resolved
org.springframework.web.servlet.handler,version=[3.0,4) -- Cannot be resolved
org.springframework.web.servlet.mvc.annotation,version=[3.0,4) -- Cannot be resolved
org.springframework.web.util,version=[3.0,4) -- Cannot be resolved
在控制檯中我看到這樣的錯誤:
ERROR: Bundle net.jasonday.examples.sling.spring.mvc [79]: Error starting/stopping bundle. (org.osgi.framework.BundleException: Unresolved constraint in bundle
net.jasonday.examples.sling.spring.mvc [79]: Unable to resolve 79.0: missing requirement [79.0] package; (&(package=javax.annotation)(version>=1.0.0)(!(version>
=2.0.0))))
org.osgi.framework.BundleException: Unresolved constraint in bundle net.jasonday.examples.sling.spring.mvc [79]: Unable to resolve 79.0: missing requirement [79
.0] package; (&(package=javax.annotation)(version>=1.0.0)(!(version>=2.0.0)))
at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3443)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1727)
at org.apache.felix.framework.Felix.setBundleStartLevel(Felix.java:1333)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:270)
at java.lang.Thread.run(Thread.java:662)
我應該怎麼做才能安裝吊索OSGi容器這些依賴?請給我一些關於這個問題的建議。