javax.servlet.UnavailableException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I've found a problem with the Jersey implementation running on OSGi that's tricky. The problem is not always reproducible! The problem is that jersey jars(com.sun.jersey.jersey-core_1.9.1.jar, com.sun.jersey.jersey-json_1.9.1.jar, com.sun.jersey.jersey-server_1.9.1.jar) use internally something called JAR Service Provider, also known as the META-INF/services system which is not OSGI friendly or this is the JDK (non OSGI ) way of defining dependencies to services -> http://weblogs.java.net/blog/bondolo/archive/2007/09/jxse_25_whats_c_2.html What I think happens: Jersey jars depend on these services and we use them indirectly as well. As we do not have explicit dependency(in the form of component.xml or something) that says to OSGI to start us when these services are available we receive exceptions due to not yet powered on services. Do you have any ideas,suggestions,comments? The full stacktrace: HTTP ERROR 503 Problem accessing /test_url. Reason: com.sun.jersey.api.container.ContainerException: No WebApplication provider is present Caused by: javax.servlet.UnavailableException: com.sun.jersey.api.container.ContainerException: No WebApplication provider is present at org.eclipse.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:394) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:439) at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:245) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:694) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:193) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:966) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:349) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:37) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:182) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:136) at org.eclipse.jetty.osgi.boot.OSGiAppProvider.addContext(OSGiAppProvider.java:154) at org.eclipse.jetty.osgi.boot.internal.webapp.WebappRegistrationHelper.registerWebapplication(WebappRegistrationHelper.java:522) at org.eclipse.jetty.osgi.boot.internal.webapp.WebappRegistrationHelper.registerWebapplication(WebappRegistrationHelper.java:438) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerServiceTracker.serviceChanged(JettyContextHandlerServiceTracker.java:189) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:206) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525) at org.eclipse.jetty.osgi.boot.JettyBootstrapActivator.registerWebapplication(JettyBootstrapActivator.java:166) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerExtender.register(JettyContextHandlerExtender.java:153) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerExtender.bundleChanged(JettyContextHandlerExtender.java:63) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
    via by systemniq,
  • I've found a problem with the Jersey implementation running on OSGi that's tricky. The problem is not always reproducible! The problem is that jersey jars(com.sun.jersey.jersey-core_1.9.1.jar, com.sun.jersey.jersey-json_1.9.1.jar, com.sun.jersey.jersey-server_1.9.1.jar) use internally something called JAR Service Provider, also known as the META-INF/services system which is not OSGI friendly or this is the JDK (non OSGI ) way of defining dependencies to services -> http://weblogs.java.net/blog/bondolo/archive/2007/09/jxse_25_whats_c_2.html What I think happens: Jersey jars depend on these services and we use them indirectly as well. As we do not have explicit dependency(in the form of component.xml or something) that says to OSGI to start us when these services are available we receive exceptions due to not yet powered on services. Do you have any ideas,suggestions,comments? The full stacktrace: HTTP ERROR 503 Problem accessing /test_url. Reason: com.sun.jersey.api.container.ContainerException: No WebApplication provider is present Caused by: javax.servlet.UnavailableException: com.sun.jersey.api.container.ContainerException: No WebApplication provider is present at org.eclipse.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:394) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:439) at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:245) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:694) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:193) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:966) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:349) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:37) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:182) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:136) at org.eclipse.jetty.osgi.boot.OSGiAppProvider.addContext(OSGiAppProvider.java:154) at org.eclipse.jetty.osgi.boot.internal.webapp.WebappRegistrationHelper.registerWebapplication(WebappRegistrationHelper.java:522) at org.eclipse.jetty.osgi.boot.internal.webapp.WebappRegistrationHelper.registerWebapplication(WebappRegistrationHelper.java:438) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerServiceTracker.serviceChanged(JettyContextHandlerServiceTracker.java:189) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:206) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525) at org.eclipse.jetty.osgi.boot.JettyBootstrapActivator.registerWebapplication(JettyBootstrapActivator.java:166) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerExtender.register(JettyContextHandlerExtender.java:153) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerExtender.bundleChanged(JettyContextHandlerExtender.java:63) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)
    via by systemniq,
  • From 2.2 to 3.0.1 updating problems
    via by Unknown author,
  • Sometime after YouTrack doesnt bootup...
    via by Unknown author,
  • HTTP 500 when attempting to use the REST API
    via by Unknown author,
    • javax.servlet.UnavailableException: com.sun.jersey.api.container.ContainerException: No WebApplication provider is present at org.eclipse.jetty.servlet.ServletHolder.makeUnavailable(ServletHolder.java:394) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:439) at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:245) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:694) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:193) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:966) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:586) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:349) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:55) at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:37) at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:182) at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:498) at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:136) at org.eclipse.jetty.osgi.boot.OSGiAppProvider.addContext(OSGiAppProvider.java:154) at org.eclipse.jetty.osgi.boot.internal.webapp.WebappRegistrationHelper.registerWebapplication(WebappRegistrationHelper.java:522) at org.eclipse.jetty.osgi.boot.internal.webapp.WebappRegistrationHelper.registerWebapplication(WebappRegistrationHelper.java:438) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerServiceTracker.serviceChanged(JettyContextHandlerServiceTracker.java:189) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:933) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:149) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:756) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:711) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:206) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:507) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:525) at org.eclipse.jetty.osgi.boot.JettyBootstrapActivator.registerWebapplication(JettyBootstrapActivator.java:166) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerExtender.register(JettyContextHandlerExtender.java:153) at org.eclipse.jetty.osgi.boot.internal.webapp.JettyContextHandlerExtender.bundleChanged(JettyContextHandlerExtender.java:63) at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:919) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,