webapp error, but bundle could running still

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

webapp error, but bundle could running still

stream
Hi. everyone deploy.zipkaraf.log

There is a problem, but not serious.
i've deployed jar to folder of deploy, and could running well. but the error is still displaying in the file of log.

i've uploaded the files, guys could run it in your karaf 2.2.0
and then open your web browser and point to http://localhost:8181/HelloWeb/hello
but the error has exist while you startup your karaf.

Could not start the servlet context for http context [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@742397]
java.lang.NullPointerException
        at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:209)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:112)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
        at org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:137)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
        at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:266)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
        at org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:107)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
        at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerResources(HttpServiceStarted.java:180)[60:org.ops4j.pax.web.pax-web-runtime:1.0.1]
        at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerResources(HttpServiceProxy.java:66)[60:org.ops4j.pax.web.pax-web-runtime:1.0.1]
        at org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:138)[72: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)[72: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)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:155)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:119)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.tracker.ReplaceableService.setService(ReplaceableService.java:114)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.tracker.ReplaceableService.access$100(ReplaceableService.java:28)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.tracker.ReplaceableService$CollectionListener.serviceAdded(ReplaceableService.java:183)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.tracker.ServiceCollection$Tracker.addingService(ServiceCollection.java:181)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)[karaf.jar:]
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)[karaf.jar:]
        at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)[karaf.jar:]
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)[karaf.jar:]
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)[karaf.jar:]
        at org.ops4j.pax.swissbox.tracker.ServiceCollection.onStart(ServiceCollection.java:139)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(AbstractLifecycle.java:121)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.tracker.ReplaceableService.onStart(ReplaceableService.java:146)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(AbstractLifecycle.java:121)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:81)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.web.extender.war.internal.WebXmlObserver.doPublish(WebXmlObserver.java:300)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.web.extender.war.internal.WebXmlObserver.addingEntries(WebXmlObserver.java:153)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.extender.BundleWatcher.register(BundleWatcher.java:186)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.extender.BundleWatcher.access$000(BundleWatcher.java:45)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.ops4j.pax.swissbox.extender.BundleWatcher$1.bundleChanged(BundleWatcher.java:127)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
        at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)[org.apache.felix.framework-3.0.8.jar:]
        at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)[org.apache.felix.framework-3.0.8.jar:]
        at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)[org.apache.felix.framework-3.0.8.jar:]
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3758)[org.apache.felix.framework-3.0.8.jar:]
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1780)[org.apache.felix.framework-3.0.8.jar:]
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)[org.apache.felix.framework-3.0.8.jar:]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1175)[6:org.apache.felix.fileinstall:3.1.10]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1153)[6:org.apache.felix.fileinstall:3.1.10]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.processAllBundles(DirectoryWatcher.java:1146)[6:org.apache.felix.fileinstall:3.1.10]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:456)[6:org.apache.felix.fileinstall:3.1.10]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)[6:org.apache.felix.fileinstall:3.1.10]
14:19:34,750 | INFO  | raf-2.2.0/deploy | /HelloWeb                        | .eclipse.jetty.util.log.Slf4jLog   55 | 50 - org.eclipse.jetty.util - 7.2.2.v20101205 | Initializing Spring root WebApplicationContext


someone could give me a suggestion
Reply | Threaded
Open this post in threaded view
|

Re: webapp error, but bundle could running still

Achim Nierbeck
Hi Stream,

your manifest is missing the Web-ContextPath entry, that's why you still
get that nullpointer exception.

Regards, Achim


> Hi. everyone  http://karaf.922171.n3.nabble.com/file/n2685297/deploy.zip
> deploy.zip  http://karaf.922171.n3.nabble.com/file/n2685297/karaf.log
> karaf.log
>
> There is a problem, but not serious.
> i've deployed jar to folder of deploy, and could running well. but the error
> is still displaying in the file of log.
>
> i've uploaded the files, guys could run it in your karaf 2.2.0
> and then open your web browser and point to
> http://localhost:8181/HelloWeb/hello
> but the error has exist while you startup your karaf.
>
> Could not start the servlet context for http context
> [org.ops4j.pax.web.extender.war.internal.WebAppWebContainerContext@742397]
> java.lang.NullPointerException
>         at
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.addContext(JettyServerWrapper.java:209)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
>         at
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper.getOrCreateContext(JettyServerWrapper.java:112)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
>         at
> org.ops4j.pax.web.service.jetty.internal.JettyServerImpl.addServlet(JettyServerImpl.java:137)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
>         at
> org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:266)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
>         at
> org.ops4j.pax.web.service.jetty.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:107)[61:org.ops4j.pax.web.pax-web-jetty:1.0.1]
>         at
> org.ops4j.pax.web.service.internal.HttpServiceStarted.registerResources(HttpServiceStarted.java:180)[60:org.ops4j.pax.web.pax-web-runtime:1.0.1]
>         at
> org.ops4j.pax.web.service.internal.HttpServiceProxy.registerResources(HttpServiceProxy.java:66)[60:org.ops4j.pax.web.pax-web-runtime:1.0.1]
>         at
> org.ops4j.pax.web.extender.war.internal.RegisterWebAppVisitorWC.visit(RegisterWebAppVisitorWC.java:138)[72: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)[72: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)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:155)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher$HttpServiceListener.serviceChanged(WebAppPublisher.java:119)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.tracker.ReplaceableService.setService(ReplaceableService.java:114)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.tracker.ReplaceableService.access$100(ReplaceableService.java:28)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.tracker.ReplaceableService$CollectionListener.serviceAdded(ReplaceableService.java:183)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.tracker.ServiceCollection$Tracker.addingService(ServiceCollection.java:181)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:896)[karaf.jar:]
>         at
> org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:261)[karaf.jar:]
>         at
> org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:184)[karaf.jar:]
>         at
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:339)[karaf.jar:]
>         at
> org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:273)[karaf.jar:]
>         at
> org.ops4j.pax.swissbox.tracker.ServiceCollection.onStart(ServiceCollection.java:139)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(AbstractLifecycle.java:121)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.tracker.ReplaceableService.onStart(ReplaceableService.java:146)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle$Stopped.start(AbstractLifecycle.java:121)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.lifecycle.AbstractLifecycle.start(AbstractLifecycle.java:49)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.web.extender.war.internal.WebAppPublisher.publish(WebAppPublisher.java:81)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.web.extender.war.internal.WebXmlObserver.doPublish(WebXmlObserver.java:300)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.web.extender.war.internal.WebXmlObserver.addingEntries(WebXmlObserver.java:153)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.extender.BundleWatcher.register(BundleWatcher.java:186)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.extender.BundleWatcher.access$000(BundleWatcher.java:45)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.ops4j.pax.swissbox.extender.BundleWatcher$1.bundleChanged(BundleWatcher.java:127)[72:org.ops4j.pax.web.pax-web-extender-war:1.0.1]
>         at
> org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)[org.apache.felix.framework-3.0.8.jar:]
>         at
> org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)[org.apache.felix.framework-3.0.8.jar:]
>         at
> org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)[org.apache.felix.framework-3.0.8.jar:]
>         at
> org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3758)[org.apache.felix.framework-3.0.8.jar:]
>         at
> org.apache.felix.framework.Felix.startBundle(Felix.java:1780)[org.apache.felix.framework-3.0.8.jar:]
>         at
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)[org.apache.felix.framework-3.0.8.jar:]
>         at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1175)[6:org.apache.felix.fileinstall:3.1.10]
>         at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1153)[6:org.apache.felix.fileinstall:3.1.10]
>         at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.processAllBundles(DirectoryWatcher.java:1146)[6:org.apache.felix.fileinstall:3.1.10]
>         at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:456)[6:org.apache.felix.fileinstall:3.1.10]
>         at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)[6:org.apache.felix.fileinstall:3.1.10]
> 14:19:34,750 | INFO  | raf-2.2.0/deploy | /HelloWeb                        |
> .eclipse.jetty.util.log.Slf4jLog   55 | 50 - org.eclipse.jetty.util -
> 7.2.2.v20101205 | Initializing Spring root WebApplicationContext
>
>
> someone could give me a suggestion
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/webapp-error-but-bundle-could-running-still-tp2685297p2685297.html
> Sent from the Karaf - User mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: webapp error, but bundle could running still

stream
Yes
thanks to Achim....