I use the karaf 2.2.0 and features:install spirng-dm spring2.5.6
spring-dm-web war. whatever just could run the sample of tomcat5.5 which
i've read in the users guide
[code]
If you want to deploy a sample web application into Karaf, you could use the
following command:
karaf@root> osgi:install -s
webbundle:http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/sample.war?Bundle-SymbolicName=tomcat-sample&Webapp-Context=/sample
Then open your web browser and point
to http://localhost:8181/sample/index.html.
[/code]
i thought could running my webApp with spring according the sample. In fact
it's run well without spring at first..
but the exception happened when i used spring with spring-dm. i just add
the a context in web.xml.
<context-param>
<param-name>contextClass</param-name> <param-value>org.springframework.osgi.web.context.support.OsgiBundleXmlWebApplicationContext</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-clas
</listener> the exception is below: Could not start the servlet context for http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@cb5d35] java.lang.NullPointerException at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:209)[86:org.ops4j.pax.web.pax-web-jetty:1.0.1] at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:112)[86:org.ops4j.pax.web.pax-web-jetty:1.0.1] at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:137)[86:org.ops4j.pax.web.pax-web-jetty:1.0.1] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:266)[86:org.ops4j.pax.web.pax-web-jetty:1.0.1] at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:107)[86:org.ops4j.pax.web.pax-web-jetty:1.0.1] at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerResources(HttpServiceStarted.java:180)[85:org.ops4j.pax.web.pax-web-runtime:1.0.1] at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerResources(HttpServiceProxy.java:66)[85:org.ops4j.pax.web.pax-web-runtime:1.0.1] at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:138)[89:org.ops4j.pax.web.pax-web-extender-war:1.0.1] at org.ops4j.pax.web.extender.war.internal.model.WebApp.accept(WebApp.java:558)[89:org.ops4j.pax.web.pax-web-extender-war:1.0.1] at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.register(WebAppPublisher.java:170)[89:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
i attache the log and file in attachfile. i hope someone could help me!~~ |
HelloWeb-0.0.1-SNAPSHOT.war
Description: Binary data
karaf.log
Description: Binary data
src.rar
Description: application/rar-compressed