Skip to content Skip to sidebar Skip to footer

Jersey On Jetty On Android Throws Containerexception: "no Webapplication Provider Is Present"

I'm trying to run Jersey on Jetty on Android. I've created an Android that instantiate a Jetty Server with a Jersey Servlet. Anyway when I start Jetty and visit a REST resource (in

Solution 1:

I had the same issue with Jetty 8 and Jersey 1.13. To solve this I added the following dependency.

<dependency><groupId>com.sun.jersey</groupId><artifactId>jersey-servlet</artifactId><version>1.13</version></dependency>

Solution 2:

WebApplicationProviderImpl is registered through META-INF/services entry in jersey-server.jar. Any chance you are repackaging Jersey into your own jars and missed the META-INF/services entries?

So to solve this exception is necessary to add the META-INF/services folders from jersey-core jersey-server and jersey-servlet to the META-INF folder of the apk.

Then you won't be able to use Eclipse to deploy but the following command line will work:

cd PROJECT_DIRECTORY

ant debug

adb install -r "bin/YOUR_PROJECT-debug.apk"

Post a Comment for "Jersey On Jetty On Android Throws Containerexception: "no Webapplication Provider Is Present""