Ok,

which bundles of pax web do you actually use?
Or better could you give us a example application to take a look at?
What makes me wonder though is that it works in Fuse/Servicemix
and therefore also in Karaf. I'd think it's probably more setup
issue of your pax exam environment.
Did you take a look on how we do the Integration tests with Pax exam?
These can be founde at [1]

Regards, Achim

[1]  - 
https://github.com/ops4j/org.ops4j.pax.web/tree/master/itest/src/test/java/org/ops4j/pax/web/itest

2011/8/17 Kyle Miller <[email protected]>:
> Hey, everyone.
>
> I'm running into some strange behavior when testing an "OSGI-ified"
> war using pax web, pax war extender and pax exam.  I'm able to deploy
> and test the war just fine on its own.  However, when I add a bundle
> that uses CXF to the testing scenarios, neither my war nor the CXF
> servlet appears to start properly.  Instead, it looks like (from the
> logs) that they both get into a loop where they each seem to keep
> initializing/registering.  I am attaching a log in case anyone is
> gracious enough to take a look.  The relevant sections appear to be as
> follows:
>
> (apologies for the DEBUG logs):
>
>
> INFO  2011-08-16 23:03:03,575 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl: Pax Web
> available at [0.0.0.0]:[8181]
> DEBUG 2011-08-16 23:03:03,576 [Configuration Updater]
> org.ops4j.pax.web.service.internal.HttpServiceStarted: Handling event:
> [STARTED]
> DEBUG 2011-08-16 23:03:03,584 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ServletEventDispatcher: Sending web
> event ServletEvent [replay=false, type=1,
> bundle=org.apache.cxf.bundle_2.4.1 [10], timestamp=1313550183584,
> alias=/cxf, servletName=cxf-osgi-transport-servlet,
> urlParameter=[Ljava.lang.String;@2e686cea,
> servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@1837b90c]
> for bundle org.apache.cxf.bundle
> DEBUG 2011-08-16 23:03:03,587 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl: Adding
> servlet 
> [ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-2,name=cxf-osgi-transport-servlet,urlPatterns=[/cxf/*],alias=/cxf,servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@1837b90c,initParams={redirects-list=,
> org.springframework.osgi.bean.name=osgiServlet, alias=/cxf,
> disable-address-updates=false, static-resources-list=,
> objectClass=[Ljava.lang.String;@173a0067, base-address=,
> servlet-name=cxf-osgi-transport-servlet, redirect-servlet-name=,
> Bundle-Version=2.4.1, redirect-servlet-path=,
> hide-service-list-page=false, service-list-path=, service.id=28,
> Bundle-SymbolicName=org.apache.cxf.bundle},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-1,name=,httpContext=DefaultHttpContext{bundle=org.apache.cxf.bundle_2.4.1
> [10]},contextParams={}}}]
> DEBUG 2011-08-16 23:03:03,588 [WebListenerExecutor: 1]
> org.ops4j.pax.web.pax-web-runtime: org/osgi/service/web/DEPLOYING
> DEBUG 2011-08-16 23:03:03,590 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper:
> configureSessionManager for context
> [HttpServiceContext{httpContext=DefaultHttpContext{bundle=org.apache.cxf.bundle_2.4.1
> [10]}}] using - timeout:5, cookie:JSESSIONID, url:jsessionid,
> workerName:null
> DEBUG 2011-08-16 23:03:03,603 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper: Session
> timeout set to 5 minutes for context
> [HttpServiceContext{httpContext=DefaultHttpContext{bundle=org.apache.cxf.bundle_2.4.1
> [10]}}]
> DEBUG 2011-08-16 23:03:03,603 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper: Session
> cookie set to JSESSIONID for context
> [HttpServiceContext{httpContext=DefaultHttpContext{bundle=org.apache.cxf.bundle_2.4.1
> [10]}}]
> DEBUG 2011-08-16 23:03:03,603 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper: Session
> URL set to jsessionid for context
> [HttpServiceContext{httpContext=DefaultHttpContext{bundle=org.apache.cxf.bundle_2.4.1
> [10]}}]
> DEBUG 2011-08-16 23:03:03,603 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper: Added
> servlet context:
> HttpServiceContext{httpContext=DefaultHttpContext{bundle=org.apache.cxf.bundle_2.4.1
> [10]}}
> DEBUG 2011-08-16 23:03:03,604 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper:
> (Re)starting servlet contexts...
> DEBUG 2011-08-16 23:03:03,620 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: Started
> servlet context for http context
> [DefaultHttpContext{bundle=org.apache.cxf.bundle_2.4.1 [10]}]
> DEBUG 2011-08-16 23:03:03,625 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper:
> Registering ServletContext as service.
> DEBUG 2011-08-16 23:03:03,626 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper:
> ServletContext registered as service.
> DEBUG 2011-08-16 23:03:03,637 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ServletEventDispatcher: Sending web
> event ServletEvent [replay=false, type=2,
> bundle=org.apache.cxf.bundle_2.4.1 [10], timestamp=1313550183637,
> alias=/cxf, servletName=cxf-osgi-transport-servlet,
> urlParameter=[Ljava.lang.String;@2e686cea,
> servlet=org.apache.cxf.transport.servlet.CXFNonSpringServlet@1837b90c]
> for bundle org.apache.cxf.bundle
> DEBUG 2011-08-16 23:03:03,637 [Configuration Updater]
> org.ops4j.pax.web.service.internal.HttpServiceStarted: Handling event:
> [STARTED]
> DEBUG 2011-08-16 23:03:03,637 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ServletEventDispatcher: Sending web
> event ServletEvent [replay=false, type=1,
> bundle=company-myproject-webapp_1.0.0.SNAPSHOT [149],
> timestamp=1313550183637, alias=null, servletName=myprojectService,
> urlParameter=[Ljava.lang.String;@72d78139,
> servlet=com.company.myproject.webapp.myprojectService@24de1f47] for
> bundle company-myproject-webapp
> DEBUG 2011-08-16 23:03:03,637 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl: Adding
> servlet 
> [ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-7,name=myprojectService,urlPatterns=[/],alias=null,servlet=com.company.myproject.webapp.myprojectService@24de1f47,initParams={servlet-name=myprojectService},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-3,name=myproject,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c,contextParams={contextConfigLocation=/WEB-INF/applicationContext.xml,
> webapp.context=myproject,
> contextClass=org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext}}}]
> DEBUG 2011-08-16 23:03:03,638 [WebListenerExecutor: 2]
> org.ops4j.pax.web.pax-web-runtime: org/osgi/service/web/DEPLOYED
> DEBUG 2011-08-16 23:03:03,638 [WebListenerExecutor: 2]
> org.ops4j.pax.web.pax-web-runtime: org/osgi/service/web/DEPLOYING
> DEBUG 2011-08-16 23:03:03,639 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper:
> configureSessionManager for context
> [HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c}]
> using - timeout:5, cookie:JSESSIONID, url:jsessionid, workerName:null
> DEBUG 2011-08-16 23:03:03,639 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper: Session
> timeout set to 5 minutes for context
> [HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c}]
> DEBUG 2011-08-16 23:03:03,639 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper: Session
> cookie set to JSESSIONID for context
> [HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c}]
> DEBUG 2011-08-16 23:03:03,639 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper: Session
> URL set to jsessionid for context
> [HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c}]
> DEBUG 2011-08-16 23:03:03,639 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper: Added
> servlet context:
> HttpServiceContext{httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c}
> DEBUG 2011-08-16 23:03:03,639 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper:
> (Re)starting servlet contexts...
> DEBUG 2011-08-16 23:03:03,644 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: Started
> servlet context for http context
> [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c]
> DEBUG 2011-08-16 23:03:03,644 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper:
> Registering ServletContext as service.
> DEBUG 2011-08-16 23:03:03,646 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper:
> ServletContext registered as service.
> DEBUG 2011-08-16 23:03:03,648 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ServletEventDispatcher: Sending web
> event ServletEvent [replay=false, type=2,
> bundle=company-myproject-webapp_1.0.0.SNAPSHOT [149],
> timestamp=1313550183648, alias=null, servletName=myprojectService,
> urlParameter=[Ljava.lang.String;@72d78139,
> servlet=com.company.myproject.webapp.myprojectService@24de1f47] for
> bundle company-myproject-webapp
> DEBUG 2011-08-16 23:03:03,649 [WebListenerExecutor: 3]
> org.ops4j.pax.web.pax-web-runtime: org/osgi/service/web/DEPLOYED
> DEBUG 2011-08-16 23:03:03,650 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ServletEventDispatcher: Sending web
> event ServletEvent [replay=false, type=1,
> bundle=company-myproject-webapp_1.0.0.SNAPSHOT [149],
> timestamp=1313550183650, alias=/, servletName=default,
> urlParameter=[Ljava.lang.String;@19cd1d94,
> servlet=ResourceServlet{context=/myproject,alias=/,name=default}] for
> bundle company-myproject-webapp
> DEBUG 2011-08-16 23:03:03,650 [WebListenerExecutor: 3]
> org.ops4j.pax.web.pax-web-runtime: org/osgi/service/web/DEPLOYING
> DEBUG 2011-08-16 23:03:03,650 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl: Adding
> servlet 
> [ResourceModel{id=org.ops4j.pax.web.service.spi.model.ResourceModel-4,name=default,urlPatterns=[/],alias=/,servlet=ResourceServlet{context=/myproject,alias=/,name=default},initParams={},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-3,name=myproject,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c,contextParams={contextConfigLocation=/WEB-INF/applicationContext.xml,
> webapp.context=myproject,
> contextClass=org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext}}}]
> DEBUG 2011-08-16 23:03:03,651 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ServletEventDispatcher: Sending web
> event ServletEvent [replay=false, type=2,
> bundle=company-myproject-webapp_1.0.0.SNAPSHOT [149],
> timestamp=1313550183651, alias=/, servletName=default,
> urlParameter=[Ljava.lang.String;@19cd1d94,
> servlet=ResourceServlet{context=/myproject,alias=/,name=default}] for
> bundle company-myproject-webapp
> DEBUG 2011-08-16 23:03:03,651 [WebListenerExecutor: 3]
> org.ops4j.pax.web.pax-web-runtime: org/osgi/service/web/DEPLOYED
> DEBUG 2011-08-16 23:03:03,651 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ServletEventDispatcher: Sending web
> event ServletEvent [replay=false, type=1,
> bundle=company-myproject-webapp_1.0.0.SNAPSHOT [149],
> timestamp=1313550183651, alias=null,
> servletName=org.ops4j.pax.web.service.spi.model.ServletModel-5,
> urlParameter=[Ljava.lang.String;@549f9afb,
> servlet=org.ops4j.pax.web.jsp.JspServletWrapper@3a780024] for bundle
> company-myproject-webapp
> DEBUG 2011-08-16 23:03:03,652 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl: Adding
> servlet 
> [ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-5,name=org.ops4j.pax.web.service.spi.model.ServletModel-5,urlPatterns=[*.jsp,
> *.jspx, *.jspf, *.xsp, *.JSP, *.JSPX, *.JSPF,
> *.XSP],alias=null,servlet=org.ops4j.pax.web.jsp.JspServletWrapper@3a780024,initParams={javaEncoding=UTF-8,
> logVerbosityLevel=WARNING, tagpoolMaxSize=5, development=true,
> keepgenerated=true,
> scratchdir=/private/var/folders/5J/5JLin7oUG9GXEhGIIJKiGU+++TI/-Tmp-/.paxweb1110312439057146444/myproject,
> mappedfile=false, checkInterval=300,
> ieClassId=clsid:8AD9C840-044E-11D1-B3E9-00805F499D93,
> enablePooling=true,
> classdebuginfo=true},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-3,name=myproject,httpContext=org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c,contextParams={contextConfigLocation=/WEB-INF/applicationContext.xml,
> webapp.context=myproject,
> contextClass=org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext}}}]
> DEBUG 2011-08-16 23:03:03,652 [WebListenerExecutor: 3]
> org.ops4j.pax.web.pax-web-runtime: org/osgi/service/web/DEPLOYING
> DEBUG 2011-08-16 23:03:03,654 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: getting
> resource: [/WEB-INF/web.xml]
> DEBUG 2011-08-16 23:03:03,654 [Configuration Updater]
> org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext:
> Searching bundle [company-myproject-webapp_1.0.0.SNAPSHOT [149]] for
> resource [/WEB-INF/web.xml], normalized to [WEB-INF/web.xml]
> DEBUG 2011-08-16 23:03:03,654 [Configuration Updater]
> org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext:
> Resource found as url [bundleentry://149.fwk980713378/WEB-INF/web.xml]
> DEBUG 2011-08-16 23:03:03,654 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: found
> resource: bundleentry://149.fwk980713378/WEB-INF/web.xml
> DEBUG 2011-08-16 23:03:03,658 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: getting
> real path: [/]
> DEBUG 2011-08-16 23:03:03,658 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: getting
> resource: [/]
> DEBUG 2011-08-16 23:03:03,658 [Configuration Updater]
> org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext:
> Searching bundle [company-myproject-webapp_1.0.0.SNAPSHOT [149]] for
> resource [], normalized to [/]
> DEBUG 2011-08-16 23:03:03,659 [Configuration Updater]
> org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext:
> Resource not found
> DEBUG 2011-08-16 23:03:03,659 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: found
> resource: null
> DEBUG 2011-08-16 23:03:03,659 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ServletEventDispatcher: Sending web
> event ServletEvent [replay=false, type=2,
> bundle=company-myproject-webapp_1.0.0.SNAPSHOT [149],
> timestamp=1313550183659, alias=null,
> servletName=org.ops4j.pax.web.service.spi.model.ServletModel-5,
> urlParameter=[Ljava.lang.String;@549f9afb,
> servlet=org.ops4j.pax.web.jsp.JspServletWrapper@3a780024] for bundle
> company-myproject-webapp
> DEBUG 2011-08-16 23:03:03,659 [WebListenerExecutor: 3]
> org.ops4j.pax.web.pax-web-runtime: org/osgi/service/web/DEPLOYED
> DEBUG 2011-08-16 23:03:03,659 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ConfigurationImpl: Reading
> configuration property org.ops4j.pax.web.config.file has failed
> DEBUG 2011-08-16 23:03:03,660 [Configuration Updater]
> org.ops4j.pax.web.pax-web-runtime: ServiceEvent MODIFIED
> DEBUG 2011-08-16 23:03:05,627 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl:
> Configuring server [ServerControllerImpl{state=STARTED}] ->
> [ConfigurationImpl{http enabled=true,http port=8181,http secure
> enabled=false,http secure port=8443,ssl
> keystore=${user.home}/.keystore,ssl keystoreType=null,session
> timeout=5,session url=jsessionid,session cookie=JSESSIONID,worker
> name=null,listening addresses=[0.0.0.0]}]
> DEBUG 2011-08-16 23:03:05,628 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl:
> Stopping server [ServerControllerImpl{state=STARTED}]
> DEBUG 2011-08-16 23:03:05,628 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl: Stopping
> JettyServerImpl{}
> DEBUG 2011-08-16 23:03:05,642 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: Stopped
> servlet context for http context
> [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@870114c]
> DEBUG 2011-08-16 23:03:05,644 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext: Stopped
> servlet context for http context
> [DefaultHttpContext{bundle=org.apache.cxf.bundle_2.4.1 [10]}]
> DEBUG 2011-08-16 23:03:05,699 [Configuration Updater]
> org.ops4j.pax.web.service.internal.HttpServiceStarted: Handling event:
> [STOPPED]
> DEBUG 2011-08-16 23:03:05,700 [Configuration Updater]
> org.ops4j.pax.web.service.internal.HttpServiceStarted: Handling event:
> [STOPPED]
> DEBUG 2011-08-16 23:03:05,700 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl:
> Starting server [ServerControllerImpl{state=STOPPED}]
> DEBUG 2011-08-16 23:03:05,701 [Configuration Updater]
> org.ops4j.pax.web.service.internal.ConfigurationImpl: Reading
> configuration property org.ops4j.pax.web.config.file has failed
> DEBUG 2011-08-16 23:03:05,701 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl: Starting
> JettyServerImpl{}
> INFO  2011-08-16 23:03:05,704 [Configuration Updater]
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl: Pax Web
> available at [0.0.0.0]:[8181]
>
> (repeated until failure)
>
> It may be worth nothing that the war and bundles I am testing work
> together without issue when deployed to Fuse/Servicemix.  Any help is
> greatly appreciated.
>
> Thank you,
> Kyle Miller
>
> _______________________________________________
> general mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/general
>
>



-- 
--
*Achim Nierbeck*


Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/>
Committer & Project Lead
blog <http://notizblog.nierbeck.de/>

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to