Hi Jochen, ok a couple of different issues here. I'll try to address those. First of all if you have a WAB, it's only a valid WAB if the Web-ContextPath attribute is inside it. The Annotated Classes only work if this is set AND if you have also a web.xml inside the war/jar if this web.xml is defined to be a version 3 web.xml. Either that or remove the corresponding web.xml :)
Since it seems to work with the webbundle I guess you are missing the first, the Web-ContextPath attribute. For resources don't - please don't - rely on extracted Jars it doesn't work this way in an OSGi container. Make sure you're able to address the resources via a standard classpath way. If it's accessible from within the bundle it will work. Take a look at a couple of different samples available at the pax-web project you'll find the correct way there. The servlet as inner class ... well Never expected that to happen. I guess I'd need to alter the scanner for that. regards, Achim 2014-11-14 9:26 GMT+01:00 jochenw <[email protected]>: > Thanks for the hints, Achim! > > Now it works - basically. The trick was to move out the servlet class from > the Vaadin main UI class. It looks like pax-web cannot deal with the > servlet > defined as inner class (TestwarUI$Servlet.class). > > I still have some problems: when installing the bundle as a wab (just with > install file:..., manifest of course filled accordingly), the WebAppParser > in org.ops4j.pax.web.pax-web-extender-war does not scan for annotated > classes. So this deployment does not work if I use the @WebServlet > annotation, but I have to include the respective definitions in the > web.xml. > When I install the bundle as plain war (install webbundle:file:...), it > scans for annotated classes and uses the @WebServlet annotation correctly. > Any idea what I have to do to trigger the scanning also for wab deployment? > > I also receive a "java.lang.AssertionError: Not a File: > /org/atmosphere/annotation" and it is not possible to access some resources > since the war is not extracted. Maybe I just have to find where to set > extractWars to true for jetty running in Karaf. > > Regards, > Jochen > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/pax-web-war-stays-in-deploying-state-tp4036280p4036414.html > Sent from the Karaf - User mailing list archive at Nabble.com. > -- Apache Member 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/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
