users@jersey.java.net

[Jersey] Re: Felix/Grizzly/Jersey

From: sunels <serkan.sunel_at_gmail.com>
Date: Wed, 21 Dec 2011 01:34:26 -0800 (PST)

I am facing the same error on the equinox osgi .
I have two osgi bundle and they are both using jersey.
The problem is that only one of them(which is invoked first) is working and
other is getting this error always.

A class loaded by a different class loader causes this error but which class
and how ?

Note : Using jersey 1.8 here
 
HTTP ERROR 500

Problem accessing /application.wadl. Reason:

    com.sun.jersey.spi.container.WebApplicationProvider: The class
com.sun.jersey.server.impl.container.WebApplicationProviderImpl implementing
provider interface com.sun.jersey.spi.container.WebApplicationProvider could
not be instantiated: null

Caused by:

com.sun.jersey.spi.service.ServiceConfigurationError:
com.sun.jersey.spi.container.WebApplicationProvider: The class
com.sun.jersey.server.impl.container.WebApplicationProviderImpl implementing
provider interface com.sun.jersey.spi.container.WebApplicationProvider could
not be instantiated: null
        at com.sun.jersey.spi.service.ServiceFinder.fail(ServiceFinder.java:602)
        at
com.sun.jersey.spi.service.ServiceFinder.access$800(ServiceFinder.java:159)
        at
com.sun.jersey.spi.service.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:892)
        at
com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:64)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:391)
        at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.create(ServletContainer.java:306)
        at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
        at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
        at
org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:322)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at com.oksijen.sdf.threadmanager.task.RegularTask.run(RegularTask.java:54)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
        at
com.oksijen.sdf.threadmanager.pool.helper.SdfThread.run(SdfThread.java:28)
Caused by: java.lang.ClassCastException
        at java.lang.Class.cast(Class.java:2990)
        at
com.sun.jersey.spi.service.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:851)
        ... 31 more

Caused by:

java.lang.ClassCastException
        at java.lang.Class.cast(Class.java:2990)
        at
com.sun.jersey.spi.service.ServiceFinder$LazyObjectIterator.hasNext(ServiceFinder.java:851)
        at
com.sun.jersey.spi.container.WebApplicationFactory.createWebApplication(WebApplicationFactory.java:64)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.create(ServletContainer.java:391)
        at
com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent.create(ServletContainer.java:306)
        at
com.sun.jersey.spi.container.servlet.WebComponent.load(WebComponent.java:607)
        at
com.sun.jersey.spi.container.servlet.WebComponent.init(WebComponent.java:210)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:373)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:556)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
        at
org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:322)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at com.oksijen.sdf.threadmanager.task.RegularTask.run(RegularTask.java:54)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
        at
com.oksijen.sdf.threadmanager.pool.helper.SdfThread.run(SdfThread.java:28)

Powered by Jetty://




If i invoke the same url again error is getting like below (I guess
somethings cached inside jersey)
HTTP ERROR 500

Problem accessing /application.wadl. Reason:

    ClassCastException: attempting to
castbundleresource://69.fwk8573456:7/javax/ws/rs/ext/RuntimeDelegate.classtobundleresource://96.fwk8573456:27/javax/ws/rs/ext/RuntimeDelegate.class

Caused by:

java.lang.LinkageError: ClassCastException: attempting to
castbundleresource://69.fwk8573456:7/javax/ws/rs/ext/RuntimeDelegate.classtobundleresource://96.fwk8573456:27/javax/ws/rs/ext/RuntimeDelegate.class
        at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:116)
        at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91)
        at javax.ws.rs.core.UriBuilder.newInstance(UriBuilder.java:69)
        at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:80)
        at javax.ws.rs.core.UriBuilder.fromUri(UriBuilder.java:99)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:662)
        at
com.oksijen.sdf.enabler.webservice.rest.SdfServletContainer.service(SdfServletContainer.java:20)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:322)
        at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)
        at com.oksijen.sdf.threadmanager.task.RegularTask.run(RegularTask.java:54)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
        at
com.oksijen.sdf.threadmanager.pool.helper.SdfThread.run(SdfThread.java:28)


--
View this message in context: http://jersey.576304.n2.nabble.com/Felix-Grizzly-Jersey-tp4224471p7114607.html
Sent from the Jersey mailing list archive at Nabble.com.