[英]OSGi LogService error when deploying apache sling in an app container
I am new to sling (and jackrabbit). 我是吊索(和野兔)的新手。 I can start the standalone sling instance without any problem. 我可以毫无问题地启动独立的吊索实例。 When I try to deploy the webapp in an app container, I get the following exception in the server.log: 当我尝试在应用程序容器中部署Webapp时,在server.log中收到以下异常:
ERROR: Error starting slinginstall:org.apache.felix.http.bridge-2.2.0.jar (java.lang.NoClassDefFoundError: org/osgi/service/log/LogService)
java.lang.NoClassDefFoundError: org/osgi/service/log/LogService
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2496)
at java.lang.Class.getConstructor0(Class.java:2806)
at java.lang.Class.newInstance(Class.java:345)
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3693)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1830)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1752)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1156)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:264)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.lang.ClassNotFoundException: org.osgi.service.log.LogService not found by org.apache.felix.http.bridge [1]
at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:787)
at org.apache.felix.framework.ModuleImpl.access$400(ModuleImpl.java:71)
at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1768)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
... 10 more
I am using Java 6. I get the same error regardless of whether I use JBoss or Glassfish. 我正在使用Java6。无论使用JBoss还是Glassfish,我都会收到相同的错误。 I've also tried building the source from the latest subversion checkout and building from the latest official release of the source code. 我还尝试从最新的subversion检出构建源代码,并从源代码的最新正式发行版中构建代码。 It seems like it is expecting some sort of logging service (or listener) to be active, but I don't know how to set one up. 似乎期望某种日志记录服务(或侦听器)处于活动状态,但我不知道如何设置它。
Thanks for any help you all can offer! 感谢您提供的所有帮助!
This was resolved by an update to the code (revision r1609438) and the problem no longer occurs during deployment of the latest code. 通过更新代码(版本r1609438)解决了该问题,并且在部署最新代码期间不再发生此问题。 Many thanks to the Apache Sling team for their fast response time! 非常感谢Apache Sling团队的快速响应时间!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.