Hi, your scenario isn't really the favored way of using Karaf, why don't you use Karaf as is? Because of Pax-Web it will give you all that a std. Web-Container is capable of and complies to the OSGi HTTP-Service spec.
To solve your issue you will need to install all required bundles without features since those usually depent on Pax-Web as it is the favored web container. Another way of doing this could be to dump the felix http service and use a custom adapted ServletBridge that uses the Pax-Web implementation, it can be done. I know that there is a project that uses Pax-Web with a custom ServletBridge. regards, Achim 2013/7/4 Mike Wilson <[email protected]> > We are using Karaf (currently 2.3.0) embedded in Tomcat, using > the Felix Servlet Bridge to expose various functionality on > web pages. > > On some startups (random behaviour) our OSGi:fied web servlets > are not reachable through Tomcat, and after some digging I've > found that this problem goes away if I remove the spring-jms, > feature because it is bringing in Pax Web: > spring-jms -> spring-web -> http (= Pax Web incl Jetty) > > So I guess Felix and Pax Web will be competing about registering > web artifacts, therefore the random behaviour. > > My question is how can we best resolve this problem? It seems a > lot of libraries we use end up referring to the "war" or "http" > features, bringing in Pax and its Jetty server, but we want to > do our web traffic through Tomcat via the servlet bridge. > > How do we best override this behaviour? We'd like to stay on > "standard Karaf" as much as possible (to make upgrades easier) > so a solution with few and simple edits is desired... > > Thanks > Mike Wilson > > -- Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home> Commiter & Project Lead blog <http://notizblog.nierbeck.de/>
