users@jersey.java.net

Jersey in Equinox3.7 --ContainerException: No WebApplication provider is present

From: anthonylee <anthonynlee_at_gmail.com>
Date: Wed, 20 Oct 2010 12:48:11 -0700 (PDT)

Hi all,

I run Equinox in command line with config.ini and got exception(No
WebApplication provider is present ).
====command===================================
 java -jar org.eclipse.osgi_3.7.0.v20100910.jar -console 9999 &
==============================================

After that I run 'ss' command in OSGI console and 'mqmonitor' bundle is in
'resolved' state and all other bundles are 'active';
I run 'start' to start my bundle. Now it is OK, no exception.
So at the beining, I wonder if it is because Jersey is not ready so there is
that exception.

What do you think? How to solved it?

Thanks in advance.

=============config.ini===================
osgi.bundles=\
plugins/javax.ws.rs.jsr311-api.jar_at_start,\
plugins/com.sun.jersey.jersey-core-1.3-SNAPSHOT.jar_at_start,\
plugins/com.sun.jersey.jersey-server-1.3-SNAPSHOT.jar_at_start,\
plugins/javax.servlet_2.5.0.v200910301333.jar_at_start,\
plugins/org.eclipse.osgi.services_3.2.100.v20100503.jar_at_start,\
plugins/org.mortbay.jetty.server_6.1.23.v201004211559.jar_at_start,\
plugins/org.eclipse.equinox.http.jetty_2.0.0.v20100503.jar_at_start,\
plugins/org.eclipse.equinox.http.servlet_1.1.0.v20100503.jar_at_start,\
plugins/org.apache.commons.logging_1.0.4.v201005080501.jar_at_start,\
plugins/org.mortbay.jetty.util_6.1.23.v201004211559.jar_at_start,\
plugins/org.apache.log4j_1.2.13.v200903072027.jar_at_start,\
plugins/com.ibm.mq.pcf_1.0.0.jar_at_start,\
plugins/com.ibm.mq_1.0.0.jar_at_start,\
plugins/com.fxinnovation.mqmonitor_1.0.0.jar_at_start
eclipse.ignoreApp=true

=======log============================
!ENTRY com.fxinnovation.mqmonitor 4 0 2010-10-20 10:33:17.303
!MESSAGE
!STACK 0
org.osgi.framework.BundleException: Exception in
com.fxinnovation.mqmonitor.Activator.start() of bundle
com.fxinnovation.mqmonitor.
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:730)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
        at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:378)
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:377)
        at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1107)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
        at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
Caused by: com.sun.jersey.api.container.ContainerException: No
WebApplication provider is present
        at
com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:66)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:350)
        at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.create(ServletContainer.java:265)
        at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:571)
        at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:211)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:332)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:496)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.init(ServletRegistration.java:49)
        at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.registerServlet(ProxyServlet.java:177)
        at
org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.registerServlet(HttpServiceImpl.java:66)
        at
com.fxinnovation.mqmonitor.Activator.rawRegisterServlets(Activator.java:80)
        at com.fxinnovation.mqmonitor.Activator.registerServlets(Activator.java:66)
        at com.fxinnovation.mqmonitor.Activator.access$1(Activator.java:64)
        at com.fxinnovation.mqmonitor.Activator$1.addingService(Activator.java:39)
        at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:910)
        at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:262)
        at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:185)
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:347)
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:282)
        at com.fxinnovation.mqmonitor.Activator.start(Activator.java:53)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:707)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:698)
        ... 12 more
Root exception:
com.sun.jersey.api.container.ContainerException: No WebApplication provider
is present
        at
com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:66)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:350)
        at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.create(ServletContainer.java:265)
        at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:571)
        at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:211)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:332)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:496)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at
org.eclipse.equinox.http.servlet.internal.ServletRegistration.init(ServletRegistration.java:49)
        at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.registerServlet(ProxyServlet.java:177)
        at
org.eclipse.equinox.http.servlet.internal.HttpServiceImpl.registerServlet(HttpServiceImpl.java:66)
        at
com.fxinnovation.mqmonitor.Activator.rawRegisterServlets(Activator.java:80)
        at com.fxinnovation.mqmonitor.Activator.registerServlets(Activator.java:66)
        at com.fxinnovation.mqmonitor.Activator.access$1(Activator.java:64)
        at com.fxinnovation.mqmonitor.Activator$1.addingService(Activator.java:39)
        at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:910)
        at
org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
        at
org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:262)
        at
org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:185)
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:347)
        at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:282)
        at com.fxinnovation.mqmonitor.Activator.start(Activator.java:53)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:707)
        at java.security.AccessController.doPrivileged(Native Method)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:698)
        at
org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
        at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:378)
        at
org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:377)
        at
org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1107)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:559)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:544)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:457)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:438)
        at
org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:1)
        at
org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
        at
org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.eclipse.osgi 4 0 2010-10-20 10:33:17.345
!MESSAGE Bundle com.fxinnovation.mqmonitor_1.0.0 [13] is not active.
-- 
View this message in context: http://jersey.576304.n2.nabble.com/Jersey-in-Equinox3-7-ContainerException-No-WebApplication-provider-is-present-tp5656365p5656365.html
Sent from the Jersey mailing list archive at Nabble.com.