Jetty 使用pax web在OSGI容器中部署web应用程序时出错

Jetty 使用pax web在OSGI容器中部署web应用程序时出错,jetty,osgi,apache-felix,pax,Jetty,Osgi,Apache Felix,Pax,您好,我正在尝试在Felix容器中部署web应用程序。 我已经对我的web应用程序完成了所有必需的配置,如清单标题的设置: Webapp上下文: 包类路径: 束激活器: 进口包装: 束符号名称: 等 我放在同一容器中的Pax包是: pax-web-service-0.6.0.jar pax-web-jsp-0.7.1.jar pax-web-extender-war-0.7.1.jar pax-logging-service-1.5.0.jar pax-logging-api-1.5.0.jar

您好,我正在尝试在Felix容器中部署web应用程序。 我已经对我的web应用程序完成了所有必需的配置,如清单标题的设置: Webapp上下文: 包类路径: 束激活器: 进口包装: 束符号名称: 等 我放在同一容器中的Pax包是: pax-web-service-0.6.0.jar pax-web-jsp-0.7.1.jar pax-web-extender-war-0.7.1.jar pax-logging-service-1.5.0.jar pax-logging-api-1.5.0.jar

虽然在pax网站上写过pax web服务包含在pax war extender中,但似乎没有pax web服务捆绑包,所有其他捆绑包都会成为障碍

我已经移除了其他pax包裹,如 pax-web-extender-whiteboard-0.7.1.jar pax-web-jetty-0.7.1.jar,因为我没有看到它们的任何用处

pax-web-jetty-0.7.1.jar甚至没有启动。它具有无法从PAX提供的任何捆绑包中解析的依赖项

我的浏览器正在显示: HTTP错误403

访问/adminmodule/时出现问题。原因:

禁止的

由码头提供动力://


而控制台日志显示: [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-REQUEST/adminmodule/on org.mortbay.jetty。HttpConnection@1e94001 [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.service.internal.model.ServerModel-匹配[/adminmodule/]。。。 [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.service.internal.model.ServerModel-路径[/adminmodule/]匹配到{pattern=/adminmodule/*,model=ResourceModel{id=org.ops4j.pax.web.service.internal.model.ResourceModel.2,name=,urlpattributes=[/],别名=/,servlet=ResourceServlet{context=/adminmodule,别名=/,name=},paraminits=},context=ContextModel{id=org.ops4j.pax.web.service.internal.model.ContextModel-1,name=adminmodule,httpContext=org.ops4j.pax.web.extender.war.internal。WebAppWebContainerContext@11710be,contextParams={webapp.context=adminmodule}} [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.service.internal.HttpServiceContext-使用http上下文[org.ops4j.pax.web.extender.war.internal]处理对[/adminmodule/]的请求。WebAppWebContainerContext@11710be] [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-sessionManager=org.mortbay.jetty.servlet。HashSessionManager@19c6163 [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-session=null [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-servlet= [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-chain=org.ops4j.pax.web.service.internal.model.FilterModel-3-> [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-servlet持有者= [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-呼叫筛选器org.ops4j.pax.web.service.internal.model.FilterModel-3 [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.service.internal.WelcomeFileFilter-应用欢迎文件筛选器。。。 [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.service.internal.WelcomeFilesFilter-Servlet路径:/ [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.service.internal.WelcomeFilesFilter-路径信息:null [5884890@qtp-16567002-0-/adminmodule/]INFO org.ops4j.pax.web.service.internal.HttpServiceContext-获取资源:[/adminmodule.jsp] [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext-搜索捆绑包[com.cisco.zaloni.gwt.admin[1]]中的资源[/adminmodule.jsp],标准化为[adminmodule.jsp] [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext-未找到资源 [5884890@qtp-16567002-0-/adminmodule/]INFO org.ops4j.pax.web.service.internal.HttpServiceContext-找到的资源:null [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-调用servlet [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext-搜索资源[]的捆绑包[com.cisco.zaloni.gwt.admin[1]],标准化为[] [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext-资源作为url找到[bundle://1.0:1/] [5884890@qtp-16567002-0-/adminmodule/]DEBUG org.mortbay.jetty-RESPONSE/adminmodule/403

这真令人沮丧

请帮忙。因为我是OSGI的新手


Raul

在pax web的1.0之前的版本中有各种各样的bug,它们总是让我绊倒。我建议从更新开始,使用最新版本,PaxWeb1.0.2似乎是今天的最新版本。如果你不想达到那么高的水平,我发现0.8.1是它真正开始正常工作的第一个版本

另外,用于部署Web应用程序捆绑包的OSGi标准要求使用您未列出的Web ContextPath头。这被设置为要从中提供内容的上下文根


ApacheAries项目有几个示例,如果没有帮助的话,可能值得一看,看看您的包与那些包有何不同。Apache Aries博客示例有文档记录,可以从下载。

我也有类似的问题-也许这个博客条目会有所帮助: