cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pratt, Jason" <Jason.Pr...@windriver.com>
Subject RE: HELP - org.glassfish.jersey.internal.RuntimeDelegateImpl not found by javax.ws.rs
Date Thu, 09 Jul 2015 17:58:45 GMT
Yes, thank you Sergey.
I went through all the dependencies last night in closer detail. I see that several were being
repeated and I removed the duplicates.
After this I discovered the cxf-specs bundle, which provided everything I needed.

My problems have been fixed. However, the CXF docs could use some updating and a few how-tos
that are not 2-3 years old.

Thank you again for the help!

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozkin@gmail.com] 
Sent: Thursday, July 09, 2015 4:39 AM
To: users@cxf.apache.org
Subject: Re: HELP - org.glassfish.jersey.internal.RuntimeDelegateImpl not found by javax.ws.rs

I've double checked - our ESB distribution uses Karaf 4.0 and the demo code creates Response
which requires RuntimeDelegate being located, and all works there.
I'm not sure, perhaps something might've changed in Karaf 4.0, related to installing CXF features
in a pure Karaf environment, may need to be investigated

Sergey

On 08/07/15 11:01, Sergey Beryozkin wrote:
> In meantime I've also updated the code which does not in your case to 
> avoid going the RuntimeDelegate path:
>
> http://git-wip-us.apache.org/repos/asf/cxf/commit/34234618
>
> So simple services (those which do not create JAX-RS Response or use 
> various JAX-RS utility calls like MediaType.valueOf("a/b"), etc, in 
> the application code) will likely need no service mix spec at all...
>
> Cheers, Sergey
>
>
> On 08/07/15 10:38, Sergey Beryozkin wrote:
>> I guess, if you start with a pure Karaf, as opposed to a ESB package, 
>> then have a look at
>>
>> http://www.liquid-reality.de/display/liquid/2011/12/22/Karaf+Tutorial
>> +Part+4+-+CXF+Services+in+OSGi
>>
>>
>>
>> and may be
>>
>> http://www.liquid-reality.de/display/liquid/2012/01/20/Big+improvemen
>> ts+for+CXF+in+OSGi+ahead+with+version+2.6.0
>>
>>
>>
>> Cheers, Sergey
>>
>> On 07/07/15 22:59, Pratt, Jason wrote:
>>> Nope, I installed version 2.5.0 of
>>> org.apache.servicemix.specs/org.apache.servicemix.specs.jsr339-api-2
>>> .0
>>> Still receiving the same error
>>>
>>> -----Original Message-----
>>> From: Pratt, Jason [mailto:Jason.Pratt@windriver.com]
>>> Sent: Tuesday, July 07, 2015 2:03 PM
>>> To: users@cxf.apache.org
>>> Subject: RE: HELP - 
>>> org.glassfish.jersey.internal.RuntimeDelegateImpl
>>> not found by javax.ws.rs
>>>
>>> No I did not know that was required for restful calls in CXF.
>>>
>>> I will try installing that now
>>>
>>> -----Original Message-----
>>> From: Sergey Beryozkin [mailto:sberyozkin@gmail.com]
>>> Sent: Tuesday, July 07, 2015 1:49 PM
>>> To: users@cxf.apache.org
>>> Subject: Re: HELP - 
>>> org.glassfish.jersey.internal.RuntimeDelegateImpl
>>> not found by javax.ws.rs
>>>
>>> Is
>>>
>>> org.apache.servicemix.specs/org.apache.servicemix.specs.jsr339-api-2
>>> .0
>>>
>>> installed ?
>>>
>>> I was running a demo with CXF 3.1.1 few days back in Karaf, no problems.
>>> I'll get JAXRSOutInterceptor updated anyway to avoid RuntimeDelegate 
>>> to avoid some strange errors like this one (may be some ordering 
>>> issue, etc)
>>>
>>> Sergey
>>>
>>> On 07/07/15 20:54, Pratt, Jason wrote:
>>>> CXF-3.1.1
>>>> KARAF-3.0.4
>>>> JDK 1.7
>>>>
>>>> I just started seeing this WARN message in my log, it is happening 
>>>> during a RESTful call. The call passes back a json document, it was 
>>>> working fine but now I am getting a 500 response.
>>>> Any advice would be great!
>>>>
>>>>
>>>> 2015-07-07 12:39:37,869 | WARN  | tp1522718697-168 |
>>>> PhaseInterceptorChain            | 181 - org.apache.cxf.cxf-core -
>>>> 3.1.1 | Interceptor for
>>>> {http://service.product.core.dart.ept.wrs.com/}$ProductLineServiceI
>>>> mpl777114985
>>>>
>>>> has thrown exception, unwinding now
>>>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by 
>>>> javax.ws.rs-api [244]
>>>>                  at
>>>> javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:152)
>>>>                  at
>>>> javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
>>>>                  at
>>>> javax.ws.rs.core.Response$ResponseBuilder.newInstance(Response.java
>>>> :848)
>>>>
>>>>                  at javax.ws.rs.core.Response.status(Response.java:613)
>>>>                  at
>>>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.processRespons
>>>> e(JAXRSOutInterceptor.java:111)[195:org.apache.cxf.cxf-rt-frontend-
>>>> jaxrs:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.jaxrs.interceptor.JAXRSOutInterceptor.handleMessage(
>>>> JAXRSOutInterceptor.java:81)[195:org.apache.cxf.cxf-rt-frontend-jax
>>>> rs:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterce
>>>> ptorChain.java:308)[181:org.apache.cxf.cxf-core:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(O
>>>> utgoingChainInterceptor.java:83)[181:org.apache.cxf.cxf-core:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterce
>>>> ptorChain.java:308)[181:org.apache.cxf.cxf-core:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainIni
>>>> tiationObserver.java:121)[181:org.apache.cxf.cxf-core:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(Abstra
>>>> ctHTTPDestination.java:251)[188:org.apache.cxf.cxf-rt-transports-ht
>>>> tp:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.servlet.ServletController.invokeDestinatio
>>>> n(ServletController.java:234)[188:org.apache.cxf.cxf-rt-transports-
>>>> http:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletCo
>>>> ntroller.java:208)[188:org.apache.cxf.cxf-rt-transports-http:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.servlet.ServletController.invoke(ServletCo
>>>> ntroller.java:160)[188:org.apache.cxf.cxf-rt-transports-http:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonS
>>>> pringServlet.java:171)[188:org.apache.cxf.cxf-rt-transports-http:3.
>>>> 1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(
>>>> AbstractHTTPServlet.java:293)[188:org.apache.cxf.cxf-rt-transports-
>>>> http:3.1.1]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(Abstract
>>>> HTTPServlet.java:217)[188:org.apache.cxf.cxf-rt-transports-http:3.1
>>>> .1]
>>>>
>>>>
>>>>                  at
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:575)[70:org
>>>> .apache.geronimo.specs.geronimo-servlet_3.0_spec:1.0.0]
>>>>
>>>>
>>>>                  at
>>>> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(Abstra
>>>> ctHTTPServlet.java:268)[188:org.apache.cxf.cxf-rt-transports-http:3
>>>> .1.1]
>>>>
>>>>
>>>>                  at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.7.0_79]
>>>>                  at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImp
>>>> l.java:57)[:1.7.0_79]
>>>>
>>>>
>>>>                  at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcc
>>>> essorImpl.java:43)[:1.7.0_79]
>>>>
>>>>
>>>>                  at
>>>> java.lang.reflect.Method.invoke(Method.java:606)[:1.7.0_79]
>>>>                  at
>>>> org.apache.aries.proxy.impl.ProxyHandler$1.invoke(ProxyHandler.java
>>>> :54)[12:org.apache.aries.proxy.impl:1.0.4]
>>>>
>>>>
>>>>                  at
>>>> org.apache.aries.proxy.impl.ProxyHandler.invoke(ProxyHandler.java:1
>>>> 19)[12:org.apache.aries.proxy.impl:1.0.4]
>>>>
>>>>
>>>>                  at
>>>> org.apache.aries.blueprint.proxy.javax.servlet.http.$HttpServlet648
>>>> 237498.service(Unknown
>>>>
>>>> Source)[70:org.apache.geronimo.specs.geronimo-servlet_3.0_spec:1.0.0]
>>>>                  at
>>>> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:6
>>>> 84)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v201504
>>>> 15]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.ja
>>>> va:503)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20
>>>> 150415]
>>>>
>>>>
>>>>                  at
>>>> org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.
>>>> doHandle(HttpServiceServletHandler.java:69)[117:org.ops4j.pax.web.p
>>>> ax-web-jetty:3.2.3]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler
>>>> .java:137)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.
>>>> v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.j
>>>> ava:557)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v2
>>>> 0150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHan
>>>> dler.java:231)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1
>>>> .17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHan
>>>> dler.java:1086)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.
>>>> 1.17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandl
>>>> e(HttpServiceContext.java:240)[117:org.ops4j.pax.web.pax-web-jetty:
>>>> 3.2.3]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.jav
>>>> a:429)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v201
>>>> 50415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHand
>>>> ler.java:193)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.
>>>> 17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHand
>>>> ler.java:1020)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1
>>>> .17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler
>>>> .java:135)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.
>>>> v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollecti
>>>> on.handle(JettyServerHandlerCollection.java:75)[117:org.ops4j.pax.w
>>>> eb.pax-web-jetty:3.2.3]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapp
>>>> er.java:116)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.1
>>>> 7.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.Server.handle(Server.java:370)[108:org.ecl
>>>> ipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(Abstr
>>>> actHttpConnection.java:494)[108:org.eclipse.jetty.aggregate.jetty-a
>>>> ll-server:8.1.17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(Abst
>>>> ractHttpConnection.java:971)[108:org.eclipse.jetty.aggregate.jetty-
>>>> all-server:8.1.17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.head
>>>> erComplete(AbstractHttpConnection.java:1033)[108:org.eclipse.jetty.
>>>> aggregate.jetty-all-server:8.1.17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)[10
>>>> 8:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:23
>>>> 5)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.17.v2015041
>>>> 5]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnec
>>>> tion.java:82)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.
>>>> 17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannel
>>>> EndPoint.java:696)[108:org.eclipse.jetty.aggregate.jetty-all-server
>>>> :8.1.17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelE
>>>> ndPoint.java:53)[108:org.eclipse.jetty.aggregate.jetty-all-server:8
>>>> .1.17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadP
>>>> ool.java:608)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.
>>>> 17.v20150415]
>>>>
>>>>
>>>>                  at
>>>> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPo
>>>> ol.java:543)[108:org.eclipse.jetty.aggregate.jetty-all-server:8.1.1
>>>> 7.v20150415]
>>>>
>>>>
>>>>                  at 
>>>> java.lang.Thread.run(Thread.java:745)[:1.7.0_79]
>>>> Caused by: java.lang.ClassNotFoundException:
>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by 
>>>> javax.ws.rs-api [244]
>>>>                  at
>>>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDe
>>>> legation(BundleWiringImpl.java:1532)
>>>>
>>>>
>>>>                  at
>>>> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiring
>>>> Impl.java:75)
>>>>
>>>>
>>>>                  at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadC
>>>> lass(BundleWiringImpl.java:1955)
>>>>
>>>>
>>>>                  at
>>>> java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_79]
>>>>                  at java.lang.Class.forName0(Native Method)[:1.7.0_79]
>>>>                  at java.lang.Class.forName(Class.java:191)[:1.7.0_79]
>>>>                  at
>>>> javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:115)
>>>>                  at
>>>> javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225)
>>>>                  at
>>>> javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
>>>>                  ... 51 more
>>>> 2015-07-07 12:39:37,954 | INFO  | tp1522718697-168 |
>>>> LoggingOutInterceptor            | 181 - org.apache.cxf.cxf-core -
>>>> 3.1.1 | Outbound Message
>>>> ---------------------------
>>>> ID: 1
>>>> Response-Code: 500
>>>> Encoding: UTF-8
>>>> Content-Type: application/json
>>>> Headers: {}
>>>> Payload: <ns1:XMLFault
>>>> xmlns:ns1="http://cxf.apache.org/bindings/xformat"><ns1:faultstring
>>>> xmlns:ns1="http://cxf.apache.org/bindings/xformat">java.lang.Runtim
>>>> eEx
>>>> ception: java.lang.ClassNotFoundException:
>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by 
>>>> javax.ws.rs-api [244]</ns1:faultstring></ns1:XMLFault>
>>>> --------------------------------------
>>>>
>>>
>>
>


Mime
View raw message