You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Benson Margulies <be...@basistech.com> on 2015/09/03 02:16:13 UTC
JAX-RS looking for Glassfishes?
I built a simple prototype of a CXF JAX-RS web service with CXF 3.1.1
and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
make a real application.
I think that I'm installing just the same features into Karaf, but as
soon as I try to return a response, I'm rewarded with the backtrace
below. Clearly I've got something confused, but, what?
ava.lang.RuntimeException: java.lang.ClassNotFoundException:
org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
javax.ws.rs-api [46]
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:590)
at javax.ws.rs.core.Response.status(Response.java:601)
at javax.ws.rs.core.Response.ok(Response.java:622)
at com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
at com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_05]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
Re: JAX-RS JS client frontend
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
I am not like hierahical interface generated by wadl-client
in Example wadl
https://github.com/rbelouin/wadl-client/blob/master/spec/swagger.js
with path segments (/test/dynamic/{param}) it leads to non-intuitive call
like
var res = client.test.dynamic._.get().withParams(["12345"]).send();
also looking on current version, it has major rewrite since, now it does
not uses promises to dispatch results, but baconjs, which is doubtful
dependency
2015-09-10 16:48 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
> Thanks for a link, this is quite interesting, having WADL XML converted
> into Swagger JSON, no problems there except that I'm not sure if it can
> cope with converting the XMLSchema grammars into JSON schemas, probably
> unlikely ?
> I linked to it from JIRA, but noted CXF can also optionally offer its own
> WADL JSON representation - which keeps the same structure as WADL XML,
> except that it expects equivalent JSON schemas be available as server
> resources...
> Either way, looks like if this frontend would work with WADL then we can
> get that WADL processed as needed for JS client to operate
>
Re: JAX-RS JS client frontend
Posted by Sergey Beryozkin <sb...@gmail.com>.
Thanks for a link, this is quite interesting, having WADL XML converted
into Swagger JSON, no problems there except that I'm not sure if it can
cope with converting the XMLSchema grammars into JSON schemas, probably
unlikely ?
I linked to it from JIRA, but noted CXF can also optionally offer its
own WADL JSON representation - which keeps the same structure as WADL
XML, except that it expects equivalent JSON schemas be available as
server resources...
Either way, looks like if this frontend would work with WADL then we can
get that WADL processed as needed for JS client to operate
Sergey
On 10/09/15 13:11, Vjacheslav V. Borisov wrote:
> 2015-09-10 15:50 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>
>>
>> Thanks, I wish we did it earlier :-). I believe RestEasy did it awhile
>> back (though not sure what exactly it offers), though the idea of having of
>> a JS frontend in CXF is not new given that it is available for WS.
>>
>
> We are using for a while https://github.com/rbelouin/wadl-client
> altough it interface is differs from what jax-rs does, istead of plain
> jax-rs resource with many functions it offers hierarchical interface
> It also uses custom json wadl format, but recently there is converter from
> wadl avaliable https://github.com/rbelouin/wadl2json
> <https://github.com/rbelouin/wadl2json>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: JAX-RS JS client frontend
Posted by "Vjacheslav V. Borisov" <sl...@gmail.com>.
2015-09-10 15:50 GMT+04:00 Sergey Beryozkin <sb...@gmail.com>:
>
> Thanks, I wish we did it earlier :-). I believe RestEasy did it awhile
> back (though not sure what exactly it offers), though the idea of having of
> a JS frontend in CXF is not new given that it is available for WS.
>
We are using for a while https://github.com/rbelouin/wadl-client
altough it interface is differs from what jax-rs does, istead of plain
jax-rs resource with many functions it offers hierarchical interface
It also uses custom json wadl format, but recently there is converter from
wadl avaliable https://github.com/rbelouin/wadl2json
<https://github.com/rbelouin/wadl2json>
Re: JAX-RS JS client frontend
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Francesco
Thanks, I wish we did it earlier :-). I believe RestEasy did it awhile
back (though not sure what exactly it offers), though the idea of having
of a JS frontend in CXF is not new given that it is available for WS.
What really interests me here is the possibility to indicate (via WADL
extensions for example) that this given payload needs to be signed with
a given crypto algo and then the JS client will somehow link it with
WebCrypto API and sign, and the CXF server will use its JWS code (or
even JCS - on the map) to validate, and all is cool, the problem is
WebCrypto API is apparently not yet well supported by all browsers, but
I hope by the time we are ready to address enhancing our would be JS RS
client to do WebCrypto the browsers will be ready :-)
Cheers, SErgey
On 10/09/15 12:31, Francesco Chicchiriccò wrote:
> On 10/09/2015 13:15, Sergey Beryozkin wrote:
>> Hi
>> On 10/09/15 11:59, Benson Margulies wrote:
>>> Serge, I'm here.
>>>
>>> The question is, does the wadl data model have enough in it to
>>> generate code in the form of a js function that sets up the right
>>> call.
>>
>> Definitely (I think so :-)), we have Java client code working with the
>> proxies generated by Wadl-to-Java. Swagger descriptions may also be
>> optionally provided.
>>
>>>
>>> I'm a bit swamped at the moment, but I can subscribe to dev and write
>>> up at least some notes on how to adapt the existing code in the
>>> direction you're looking for.
>>
>> Sounds good, I've opened
>> https://issues.apache.org/jira/browse/CXF-6589
>>
>> This is something which is definitely not urgent, so please share some
>> ideas at the dev or CXF-6589 whenever you have some time.
>
> This looks very cool, I don't have enough knowledge to contribute, but I
> am very interested anyway.
> Borderless CXF :-)
>
> Regards.
>
>>> On Thu, Sep 10, 2015 at 6:54 AM, Sergey Beryozkin
>>> <sb...@gmail.com> wrote:
>>>> Hi Benson
>>>>
>>>> Hope you are reading it,
>>>> I've had this plan for a while, and given you did a JS WS frontend
>>>> (sorry if
>>>> my memory is wrong here :-)), I'd just like to ask for some ideas on
>>>> how a
>>>> similar RS frontend can be created.
>>>> The longer term plan is to weave Web Crypto into that somehow but
>>>> first it
>>>> would be good to have a plain RS JS frontend available. Perhaps I
>>>> can even
>>>> hope you can prototype something :-) ?
>>>>
>>>> Cheers, Sergey
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: JAX-RS JS client frontend
Posted by Francesco Chicchiriccò <il...@apache.org>.
On 10/09/2015 13:15, Sergey Beryozkin wrote:
> Hi
> On 10/09/15 11:59, Benson Margulies wrote:
>> Serge, I'm here.
>>
>> The question is, does the wadl data model have enough in it to
>> generate code in the form of a js function that sets up the right
>> call.
>
> Definitely (I think so :-)), we have Java client code working with the
> proxies generated by Wadl-to-Java. Swagger descriptions may also be
> optionally provided.
>
>>
>> I'm a bit swamped at the moment, but I can subscribe to dev and write
>> up at least some notes on how to adapt the existing code in the
>> direction you're looking for.
>
> Sounds good, I've opened
> https://issues.apache.org/jira/browse/CXF-6589
>
> This is something which is definitely not urgent, so please share some
> ideas at the dev or CXF-6589 whenever you have some time.
This looks very cool, I don't have enough knowledge to contribute, but I
am very interested anyway.
Borderless CXF :-)
Regards.
>> On Thu, Sep 10, 2015 at 6:54 AM, Sergey Beryozkin
>> <sb...@gmail.com> wrote:
>>> Hi Benson
>>>
>>> Hope you are reading it,
>>> I've had this plan for a while, and given you did a JS WS frontend
>>> (sorry if
>>> my memory is wrong here :-)), I'd just like to ask for some ideas on
>>> how a
>>> similar RS frontend can be created.
>>> The longer term plan is to weave Web Crypto into that somehow but
>>> first it
>>> would be good to have a plain RS JS frontend available. Perhaps I
>>> can even
>>> hope you can prototype something :-) ?
>>>
>>> Cheers, Sergey
--
Francesco Chicchiriccò
Tirasa - Open Source Excellence
http://www.tirasa.net/
Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC
http://people.apache.org/~ilgrosso/
Re: JAX-RS JS client frontend
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 10/09/15 11:59, Benson Margulies wrote:
> Serge, I'm here.
>
> The question is, does the wadl data model have enough in it to
> generate code in the form of a js function that sets up the right
> call.
Definitely (I think so :-)), we have Java client code working with the
proxies generated by Wadl-to-Java. Swagger descriptions may also be
optionally provided.
>
> I'm a bit swamped at the moment, but I can subscribe to dev and write
> up at least some notes on how to adapt the existing code in the
> direction you're looking for.
Sounds good, I've opened
https://issues.apache.org/jira/browse/CXF-6589
This is something which is definitely not urgent, so please share some
ideas at the dev or CXF-6589 whenever you have some time.
Cheers, Sergey
>
>
> On Thu, Sep 10, 2015 at 6:54 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
>> Hi Benson
>>
>> Hope you are reading it,
>> I've had this plan for a while, and given you did a JS WS frontend (sorry if
>> my memory is wrong here :-)), I'd just like to ask for some ideas on how a
>> similar RS frontend can be created.
>> The longer term plan is to weave Web Crypto into that somehow but first it
>> would be good to have a plain RS JS frontend available. Perhaps I can even
>> hope you can prototype something :-) ?
>>
>> Cheers, Sergey
Re: JAX-RS JS client frontend
Posted by Benson Margulies <be...@basistech.com>.
Serge, I'm here.
The question is, does the wadl data model have enough in it to
generate code in the form of a js function that sets up the right
call.
I'm a bit swamped at the moment, but I can subscribe to dev and write
up at least some notes on how to adapt the existing code in the
direction you're looking for.
On Thu, Sep 10, 2015 at 6:54 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Hi Benson
>
> Hope you are reading it,
> I've had this plan for a while, and given you did a JS WS frontend (sorry if
> my memory is wrong here :-)), I'd just like to ask for some ideas on how a
> similar RS frontend can be created.
> The longer term plan is to weave Web Crypto into that somehow but first it
> would be good to have a plain RS JS frontend available. Perhaps I can even
> hope you can prototype something :-) ?
>
> Cheers, Sergey
JAX-RS JS client frontend
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Benson
Hope you are reading it,
I've had this plan for a while, and given you did a JS WS frontend
(sorry if my memory is wrong here :-)), I'd just like to ask for some
ideas on how a similar RS frontend can be created.
The longer term plan is to weave Web Crypto into that somehow but first
it would be good to have a plain RS JS frontend available. Perhaps I can
even hope you can prototype something :-) ?
Cheers, Sergey
Re: JAX-RS looking for Glassfishes?
Posted by Sergey Beryozkin <sb...@gmail.com>.
Example, if you use Response only to set a custom error status then you
may throw WebApplicationException (or subclass) instead, likewise if you
use Response to add extra headers then equally you can do it in response
filters, etc, but as I said I'm not encouraging you to do it, just
mentioning it fyi given that having extra filters may have its own
(configuration) costs, etc...
Sergey
On 03/09/15 14:05, Sergey Beryozkin wrote:
> No spec bundle is needed only if the application code does not use the
> constructs that depend on RuntimeDelegate, in general any code that
> returns custom types only and relies on JAX-RS filters to add the extra
> headers, etc would work (I hope - tried to make sure the runtime avoids
> static constructs like MediaType.valueof, etc)
>
> Sergey
> On 03/09/15 13:55, Benson Margulies wrote:
>> So, switching to 3.1.2 didn't do the trick. Marking the dependency on
>> the javax jar 'provided' worked, since the CXF feature pulls in the
>> servicemix jar as you all pointed out.
>>
>>
>> On Thu, Sep 3, 2015 at 6:51 AM, Sergey Beryozkin
>> <sb...@gmail.com> wrote:
>>> See
>>>
>>> https://github.com/apache/cxf/blob/master/osgi/karaf/features/src/main/resources/features.xml#L20
>>>
>>>
>>> I believe it is a boot time feature.
>>>
>>> Sergey
>>>
>>> On 03/09/15 11:37, Benson Margulies wrote:
>>>>
>>>> That's true, I'm not. Or, to be exact, I bet it's in the container,
>>>> but I don't declare it as the dependency on my POM. What does it to do
>>>> arrange this?
>>>>
>>>> On Thu, Sep 3, 2015 at 5:09 AM, Sergey Beryozkin <sb...@gmail.com>
>>>> wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> Indeed.
>>>>> FYI, it should be possible not to install it starting from CXF
>>>>> 3.1.2, but
>>>>> only if the application code does not use Response or other static
>>>>> utility
>>>>> methods like MediaType.valueOf() which rely on RuntimeDelegate.
>>>>> Example if one has ContainerResponseFilter then all the response
>>>>> headers
>>>>> can
>>>>> be set there, etc.
>>>>> I guess it does not make much sense to rewrite the code just to avoid
>>>>> installing a service mix bundle :-), but just mentioning here that the
>>>>> option exists...
>>>>>
>>>>> Sergey
>>>>>
>>>>>
>>>>> On 03/09/15 07:06, Aki Yoshida wrote:
>>>>>>
>>>>>>
>>>>>> it looks like you are not using servicemix's jaxrs api bundle?
>>>>>>
>>>>>>
>>>>>> 2015-09-03 3:18 GMT+02:00 Benson Margulies <be...@basistech.com>:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
>>>>>>>
>>>>>>> as a system property fixed this, but why did I need to add it?
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Sep 2, 2015 at 9:04 PM, Benson Margulies
>>>>>>> <be...@basistech.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> Oh, arg, I was wrong. It's still broken, even with the service
>>>>>>>> description bundle in the dependencies.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies
>>>>>>>> <be...@basistech.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I found my own oversight.
>>>>>>>>>
>>>>>>>>> I had split off some utilities, and the utility bundle did not do:
>>>>>>>>>
>>>>>>>>> <dependency>
>>>>>>>>> <groupId>org.apache.cxf</groupId>
>>>>>>>>> <artifactId>cxf-rt-rs-service-description</artifactId>
>>>>>>>>> <version>${cxf-version}</version>
>>>>>>>>> </dependency>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies
>>>>>>>>> <be...@basistech.com>
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> I built a simple prototype of a CXF JAX-RS web service with CXF
>>>>>>>>>> 3.1.1
>>>>>>>>>> and Karaf 4.0.1 that worked great. So I moved on to flesh it
>>>>>>>>>> out to
>>>>>>>>>> make a real application.
>>>>>>>>>>
>>>>>>>>>> I think that I'm installing just the same features into Karaf,
>>>>>>>>>> but
>>>>>>>>>> as
>>>>>>>>>> soon as I try to return a response, I'm rewarded with the
>>>>>>>>>> backtrace
>>>>>>>>>> below. Clearly I've got something confused, but, what?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>>>>>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>>>>>>>> javax.ws.rs-api [46]
>>>>>>>>>> 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:590)
>>>>>>>>>> at javax.ws.rs.core.Response.status(Response.java:601)
>>>>>>>>>> at javax.ws.rs.core.Response.ok(Response.java:622)
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>>>>>>>>>>
>>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>>>>>> Method)[:1.8.0_05]
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>>>>>>>>>>
>>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>>>>>>
>>>>>>>>>> at
>>>>>>>>>>
>>>>>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
>>>>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>
>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: JAX-RS looking for Glassfishes?
Posted by Sergey Beryozkin <sb...@gmail.com>.
No spec bundle is needed only if the application code does not use the
constructs that depend on RuntimeDelegate, in general any code that
returns custom types only and relies on JAX-RS filters to add the extra
headers, etc would work (I hope - tried to make sure the runtime avoids
static constructs like MediaType.valueof, etc)
Sergey
On 03/09/15 13:55, Benson Margulies wrote:
> So, switching to 3.1.2 didn't do the trick. Marking the dependency on
> the javax jar 'provided' worked, since the CXF feature pulls in the
> servicemix jar as you all pointed out.
>
>
> On Thu, Sep 3, 2015 at 6:51 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
>> See
>>
>> https://github.com/apache/cxf/blob/master/osgi/karaf/features/src/main/resources/features.xml#L20
>>
>> I believe it is a boot time feature.
>>
>> Sergey
>>
>> On 03/09/15 11:37, Benson Margulies wrote:
>>>
>>> That's true, I'm not. Or, to be exact, I bet it's in the container,
>>> but I don't declare it as the dependency on my POM. What does it to do
>>> arrange this?
>>>
>>> On Thu, Sep 3, 2015 at 5:09 AM, Sergey Beryozkin <sb...@gmail.com>
>>> wrote:
>>>>
>>>> Hi
>>>>
>>>> Indeed.
>>>> FYI, it should be possible not to install it starting from CXF 3.1.2, but
>>>> only if the application code does not use Response or other static
>>>> utility
>>>> methods like MediaType.valueOf() which rely on RuntimeDelegate.
>>>> Example if one has ContainerResponseFilter then all the response headers
>>>> can
>>>> be set there, etc.
>>>> I guess it does not make much sense to rewrite the code just to avoid
>>>> installing a service mix bundle :-), but just mentioning here that the
>>>> option exists...
>>>>
>>>> Sergey
>>>>
>>>>
>>>> On 03/09/15 07:06, Aki Yoshida wrote:
>>>>>
>>>>>
>>>>> it looks like you are not using servicemix's jaxrs api bundle?
>>>>>
>>>>>
>>>>> 2015-09-03 3:18 GMT+02:00 Benson Margulies <be...@basistech.com>:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
>>>>>> as a system property fixed this, but why did I need to add it?
>>>>>>
>>>>>>
>>>>>> On Wed, Sep 2, 2015 at 9:04 PM, Benson Margulies <be...@basistech.com>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Oh, arg, I was wrong. It's still broken, even with the service
>>>>>>> description bundle in the dependencies.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies
>>>>>>> <be...@basistech.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> I found my own oversight.
>>>>>>>>
>>>>>>>> I had split off some utilities, and the utility bundle did not do:
>>>>>>>>
>>>>>>>> <dependency>
>>>>>>>> <groupId>org.apache.cxf</groupId>
>>>>>>>> <artifactId>cxf-rt-rs-service-description</artifactId>
>>>>>>>> <version>${cxf-version}</version>
>>>>>>>> </dependency>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies
>>>>>>>> <be...@basistech.com>
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I built a simple prototype of a CXF JAX-RS web service with CXF
>>>>>>>>> 3.1.1
>>>>>>>>> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
>>>>>>>>> make a real application.
>>>>>>>>>
>>>>>>>>> I think that I'm installing just the same features into Karaf, but
>>>>>>>>> as
>>>>>>>>> soon as I try to return a response, I'm rewarded with the backtrace
>>>>>>>>> below. Clearly I've got something confused, but, what?
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>>>>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>>>>>>> javax.ws.rs-api [46]
>>>>>>>>> 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:590)
>>>>>>>>> at javax.ws.rs.core.Response.status(Response.java:601)
>>>>>>>>> at javax.ws.rs.core.Response.ok(Response.java:622)
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>>>>> Method)[:1.8.0_05]
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>>>>> at
>>>>>>>>>
>>>>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
>>>>
>>>>
>>>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: JAX-RS looking for Glassfishes?
Posted by Benson Margulies <be...@basistech.com>.
So, switching to 3.1.2 didn't do the trick. Marking the dependency on
the javax jar 'provided' worked, since the CXF feature pulls in the
servicemix jar as you all pointed out.
On Thu, Sep 3, 2015 at 6:51 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> See
>
> https://github.com/apache/cxf/blob/master/osgi/karaf/features/src/main/resources/features.xml#L20
>
> I believe it is a boot time feature.
>
> Sergey
>
> On 03/09/15 11:37, Benson Margulies wrote:
>>
>> That's true, I'm not. Or, to be exact, I bet it's in the container,
>> but I don't declare it as the dependency on my POM. What does it to do
>> arrange this?
>>
>> On Thu, Sep 3, 2015 at 5:09 AM, Sergey Beryozkin <sb...@gmail.com>
>> wrote:
>>>
>>> Hi
>>>
>>> Indeed.
>>> FYI, it should be possible not to install it starting from CXF 3.1.2, but
>>> only if the application code does not use Response or other static
>>> utility
>>> methods like MediaType.valueOf() which rely on RuntimeDelegate.
>>> Example if one has ContainerResponseFilter then all the response headers
>>> can
>>> be set there, etc.
>>> I guess it does not make much sense to rewrite the code just to avoid
>>> installing a service mix bundle :-), but just mentioning here that the
>>> option exists...
>>>
>>> Sergey
>>>
>>>
>>> On 03/09/15 07:06, Aki Yoshida wrote:
>>>>
>>>>
>>>> it looks like you are not using servicemix's jaxrs api bundle?
>>>>
>>>>
>>>> 2015-09-03 3:18 GMT+02:00 Benson Margulies <be...@basistech.com>:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
>>>>> as a system property fixed this, but why did I need to add it?
>>>>>
>>>>>
>>>>> On Wed, Sep 2, 2015 at 9:04 PM, Benson Margulies <be...@basistech.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Oh, arg, I was wrong. It's still broken, even with the service
>>>>>> description bundle in the dependencies.
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies
>>>>>> <be...@basistech.com>
>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> I found my own oversight.
>>>>>>>
>>>>>>> I had split off some utilities, and the utility bundle did not do:
>>>>>>>
>>>>>>> <dependency>
>>>>>>> <groupId>org.apache.cxf</groupId>
>>>>>>> <artifactId>cxf-rt-rs-service-description</artifactId>
>>>>>>> <version>${cxf-version}</version>
>>>>>>> </dependency>
>>>>>>>
>>>>>>>
>>>>>>> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies
>>>>>>> <be...@basistech.com>
>>>>>>> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>> I built a simple prototype of a CXF JAX-RS web service with CXF
>>>>>>>> 3.1.1
>>>>>>>> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
>>>>>>>> make a real application.
>>>>>>>>
>>>>>>>> I think that I'm installing just the same features into Karaf, but
>>>>>>>> as
>>>>>>>> soon as I try to return a response, I'm rewarded with the backtrace
>>>>>>>> below. Clearly I've got something confused, but, what?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>>>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>>>>>> javax.ws.rs-api [46]
>>>>>>>> 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:590)
>>>>>>>> at javax.ws.rs.core.Response.status(Response.java:601)
>>>>>>>> at javax.ws.rs.core.Response.ok(Response.java:622)
>>>>>>>> at
>>>>>>>>
>>>>>>>> com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>>>>>>>> at
>>>>>>>>
>>>>>>>> com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>>>> Method)[:1.8.0_05]
>>>>>>>> at
>>>>>>>>
>>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>>>>>>>> at
>>>>>>>>
>>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>>>>>>>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>>>> at
>>>>>>>>
>>>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
>>>
>>>
>>>
>
>
> --
> Sergey Beryozkin
>
> Talend Community Coders
> http://coders.talend.com/
Re: JAX-RS looking for Glassfishes?
Posted by Sergey Beryozkin <sb...@gmail.com>.
See
https://github.com/apache/cxf/blob/master/osgi/karaf/features/src/main/resources/features.xml#L20
I believe it is a boot time feature.
Sergey
On 03/09/15 11:37, Benson Margulies wrote:
> That's true, I'm not. Or, to be exact, I bet it's in the container,
> but I don't declare it as the dependency on my POM. What does it to do
> arrange this?
>
> On Thu, Sep 3, 2015 at 5:09 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
>> Hi
>>
>> Indeed.
>> FYI, it should be possible not to install it starting from CXF 3.1.2, but
>> only if the application code does not use Response or other static utility
>> methods like MediaType.valueOf() which rely on RuntimeDelegate.
>> Example if one has ContainerResponseFilter then all the response headers can
>> be set there, etc.
>> I guess it does not make much sense to rewrite the code just to avoid
>> installing a service mix bundle :-), but just mentioning here that the
>> option exists...
>>
>> Sergey
>>
>>
>> On 03/09/15 07:06, Aki Yoshida wrote:
>>>
>>> it looks like you are not using servicemix's jaxrs api bundle?
>>>
>>>
>>> 2015-09-03 3:18 GMT+02:00 Benson Margulies <be...@basistech.com>:
>>>>
>>>>
>>>> javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
>>>> as a system property fixed this, but why did I need to add it?
>>>>
>>>>
>>>> On Wed, Sep 2, 2015 at 9:04 PM, Benson Margulies <be...@basistech.com>
>>>> wrote:
>>>>>
>>>>> Oh, arg, I was wrong. It's still broken, even with the service
>>>>> description bundle in the dependencies.
>>>>>
>>>>>
>>>>>
>>>>> On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies <be...@basistech.com>
>>>>> wrote:
>>>>>>
>>>>>> I found my own oversight.
>>>>>>
>>>>>> I had split off some utilities, and the utility bundle did not do:
>>>>>>
>>>>>> <dependency>
>>>>>> <groupId>org.apache.cxf</groupId>
>>>>>> <artifactId>cxf-rt-rs-service-description</artifactId>
>>>>>> <version>${cxf-version}</version>
>>>>>> </dependency>
>>>>>>
>>>>>>
>>>>>> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies <be...@basistech.com>
>>>>>> wrote:
>>>>>>>
>>>>>>> I built a simple prototype of a CXF JAX-RS web service with CXF 3.1.1
>>>>>>> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
>>>>>>> make a real application.
>>>>>>>
>>>>>>> I think that I'm installing just the same features into Karaf, but as
>>>>>>> soon as I try to return a response, I'm rewarded with the backtrace
>>>>>>> below. Clearly I've got something confused, but, what?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>>>>> javax.ws.rs-api [46]
>>>>>>> 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:590)
>>>>>>> at javax.ws.rs.core.Response.status(Response.java:601)
>>>>>>> at javax.ws.rs.core.Response.ok(Response.java:622)
>>>>>>> at
>>>>>>> com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>>>>>>> at
>>>>>>> com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>>> Method)[:1.8.0_05]
>>>>>>> at
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>>>>>>> at
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>>>>>>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>>>>>>> at
>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>>> at
>>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>>> at
>>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
>>
>>
--
Sergey Beryozkin
Talend Community Coders
http://coders.talend.com/
Re: JAX-RS looking for Glassfishes?
Posted by Benson Margulies <be...@basistech.com>.
That's true, I'm not. Or, to be exact, I bet it's in the container,
but I don't declare it as the dependency on my POM. What does it to do
arrange this?
On Thu, Sep 3, 2015 at 5:09 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> Hi
>
> Indeed.
> FYI, it should be possible not to install it starting from CXF 3.1.2, but
> only if the application code does not use Response or other static utility
> methods like MediaType.valueOf() which rely on RuntimeDelegate.
> Example if one has ContainerResponseFilter then all the response headers can
> be set there, etc.
> I guess it does not make much sense to rewrite the code just to avoid
> installing a service mix bundle :-), but just mentioning here that the
> option exists...
>
> Sergey
>
>
> On 03/09/15 07:06, Aki Yoshida wrote:
>>
>> it looks like you are not using servicemix's jaxrs api bundle?
>>
>>
>> 2015-09-03 3:18 GMT+02:00 Benson Margulies <be...@basistech.com>:
>>>
>>>
>>> javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
>>> as a system property fixed this, but why did I need to add it?
>>>
>>>
>>> On Wed, Sep 2, 2015 at 9:04 PM, Benson Margulies <be...@basistech.com>
>>> wrote:
>>>>
>>>> Oh, arg, I was wrong. It's still broken, even with the service
>>>> description bundle in the dependencies.
>>>>
>>>>
>>>>
>>>> On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies <be...@basistech.com>
>>>> wrote:
>>>>>
>>>>> I found my own oversight.
>>>>>
>>>>> I had split off some utilities, and the utility bundle did not do:
>>>>>
>>>>> <dependency>
>>>>> <groupId>org.apache.cxf</groupId>
>>>>> <artifactId>cxf-rt-rs-service-description</artifactId>
>>>>> <version>${cxf-version}</version>
>>>>> </dependency>
>>>>>
>>>>>
>>>>> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies <be...@basistech.com>
>>>>> wrote:
>>>>>>
>>>>>> I built a simple prototype of a CXF JAX-RS web service with CXF 3.1.1
>>>>>> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
>>>>>> make a real application.
>>>>>>
>>>>>> I think that I'm installing just the same features into Karaf, but as
>>>>>> soon as I try to return a response, I'm rewarded with the backtrace
>>>>>> below. Clearly I've got something confused, but, what?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>>>> javax.ws.rs-api [46]
>>>>>> 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:590)
>>>>>> at javax.ws.rs.core.Response.status(Response.java:601)
>>>>>> at javax.ws.rs.core.Response.ok(Response.java:622)
>>>>>> at
>>>>>> com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>>>>>> at
>>>>>> com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>>>> Method)[:1.8.0_05]
>>>>>> at
>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>>>>>> at
>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>>>>>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>>>>>> at
>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>> at
>>>>>> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>>> at
>>>>>> org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
>
>
Re: JAX-RS looking for Glassfishes?
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
Indeed.
FYI, it should be possible not to install it starting from CXF 3.1.2,
but only if the application code does not use Response or other static
utility methods like MediaType.valueOf() which rely on RuntimeDelegate.
Example if one has ContainerResponseFilter then all the response headers
can be set there, etc.
I guess it does not make much sense to rewrite the code just to avoid
installing a service mix bundle :-), but just mentioning here that the
option exists...
Sergey
On 03/09/15 07:06, Aki Yoshida wrote:
> it looks like you are not using servicemix's jaxrs api bundle?
>
>
> 2015-09-03 3:18 GMT+02:00 Benson Margulies <be...@basistech.com>:
>> javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
>> as a system property fixed this, but why did I need to add it?
>>
>>
>> On Wed, Sep 2, 2015 at 9:04 PM, Benson Margulies <be...@basistech.com> wrote:
>>> Oh, arg, I was wrong. It's still broken, even with the service
>>> description bundle in the dependencies.
>>>
>>>
>>>
>>> On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies <be...@basistech.com> wrote:
>>>> I found my own oversight.
>>>>
>>>> I had split off some utilities, and the utility bundle did not do:
>>>>
>>>> <dependency>
>>>> <groupId>org.apache.cxf</groupId>
>>>> <artifactId>cxf-rt-rs-service-description</artifactId>
>>>> <version>${cxf-version}</version>
>>>> </dependency>
>>>>
>>>>
>>>> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies <be...@basistech.com> wrote:
>>>>> I built a simple prototype of a CXF JAX-RS web service with CXF 3.1.1
>>>>> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
>>>>> make a real application.
>>>>>
>>>>> I think that I'm installing just the same features into Karaf, but as
>>>>> soon as I try to return a response, I'm rewarded with the backtrace
>>>>> below. Clearly I've got something confused, but, what?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>>> javax.ws.rs-api [46]
>>>>> 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:590)
>>>>> at javax.ws.rs.core.Response.status(Response.java:601)
>>>>> at javax.ws.rs.core.Response.ok(Response.java:622)
>>>>> at com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>>>>> at com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_05]
>>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>>>>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>>>>> at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>>>>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
Re: JAX-RS looking for Glassfishes?
Posted by Aki Yoshida <el...@gmail.com>.
it looks like you are not using servicemix's jaxrs api bundle?
2015-09-03 3:18 GMT+02:00 Benson Margulies <be...@basistech.com>:
> javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
> as a system property fixed this, but why did I need to add it?
>
>
> On Wed, Sep 2, 2015 at 9:04 PM, Benson Margulies <be...@basistech.com> wrote:
>> Oh, arg, I was wrong. It's still broken, even with the service
>> description bundle in the dependencies.
>>
>>
>>
>> On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies <be...@basistech.com> wrote:
>>> I found my own oversight.
>>>
>>> I had split off some utilities, and the utility bundle did not do:
>>>
>>> <dependency>
>>> <groupId>org.apache.cxf</groupId>
>>> <artifactId>cxf-rt-rs-service-description</artifactId>
>>> <version>${cxf-version}</version>
>>> </dependency>
>>>
>>>
>>> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies <be...@basistech.com> wrote:
>>>> I built a simple prototype of a CXF JAX-RS web service with CXF 3.1.1
>>>> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
>>>> make a real application.
>>>>
>>>> I think that I'm installing just the same features into Karaf, but as
>>>> soon as I try to return a response, I'm rewarded with the backtrace
>>>> below. Clearly I've got something confused, but, what?
>>>>
>>>>
>>>>
>>>>
>>>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>> javax.ws.rs-api [46]
>>>> 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:590)
>>>> at javax.ws.rs.core.Response.status(Response.java:601)
>>>> at javax.ws.rs.core.Response.ok(Response.java:622)
>>>> at com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>>>> at com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_05]
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>>>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>>>> at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>>>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>>>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
Re: JAX-RS looking for Glassfishes?
Posted by Benson Margulies <be...@basistech.com>.
javax.ws.rs.ext.RuntimeDelegate=org.apache.cxf.jaxrs.impl.RuntimeDelegateImpl
as a system property fixed this, but why did I need to add it?
On Wed, Sep 2, 2015 at 9:04 PM, Benson Margulies <be...@basistech.com> wrote:
> Oh, arg, I was wrong. It's still broken, even with the service
> description bundle in the dependencies.
>
>
>
> On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies <be...@basistech.com> wrote:
>> I found my own oversight.
>>
>> I had split off some utilities, and the utility bundle did not do:
>>
>> <dependency>
>> <groupId>org.apache.cxf</groupId>
>> <artifactId>cxf-rt-rs-service-description</artifactId>
>> <version>${cxf-version}</version>
>> </dependency>
>>
>>
>> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies <be...@basistech.com> wrote:
>>> I built a simple prototype of a CXF JAX-RS web service with CXF 3.1.1
>>> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
>>> make a real application.
>>>
>>> I think that I'm installing just the same features into Karaf, but as
>>> soon as I try to return a response, I'm rewarded with the backtrace
>>> below. Clearly I've got something confused, but, what?
>>>
>>>
>>>
>>>
>>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>> javax.ws.rs-api [46]
>>> 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:590)
>>> at javax.ws.rs.core.Response.status(Response.java:601)
>>> at javax.ws.rs.core.Response.ok(Response.java:622)
>>> at com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>>> at com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_05]
>>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>>> at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
Re: JAX-RS looking for Glassfishes?
Posted by Benson Margulies <be...@basistech.com>.
Oh, arg, I was wrong. It's still broken, even with the service
description bundle in the dependencies.
On Wed, Sep 2, 2015 at 8:55 PM, Benson Margulies <be...@basistech.com> wrote:
> I found my own oversight.
>
> I had split off some utilities, and the utility bundle did not do:
>
> <dependency>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-rt-rs-service-description</artifactId>
> <version>${cxf-version}</version>
> </dependency>
>
>
> On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies <be...@basistech.com> wrote:
>> I built a simple prototype of a CXF JAX-RS web service with CXF 3.1.1
>> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
>> make a real application.
>>
>> I think that I'm installing just the same features into Karaf, but as
>> soon as I try to return a response, I'm rewarded with the backtrace
>> below. Clearly I've got something confused, but, what?
>>
>>
>>
>>
>> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>> javax.ws.rs-api [46]
>> 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:590)
>> at javax.ws.rs.core.Response.status(Response.java:601)
>> at javax.ws.rs.core.Response.ok(Response.java:622)
>> at com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
>> at com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_05]
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
>> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
>> at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
>> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
>> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]
Re: JAX-RS looking for Glassfishes?
Posted by Benson Margulies <be...@basistech.com>.
I found my own oversight.
I had split off some utilities, and the utility bundle did not do:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description</artifactId>
<version>${cxf-version}</version>
</dependency>
On Wed, Sep 2, 2015 at 8:16 PM, Benson Margulies <be...@basistech.com> wrote:
> I built a simple prototype of a CXF JAX-RS web service with CXF 3.1.1
> and Karaf 4.0.1 that worked great. So I moved on to flesh it out to
> make a real application.
>
> I think that I'm installing just the same features into Karaf, but as
> soon as I try to return a response, I'm rewarded with the backtrace
> below. Clearly I've got something confused, but, what?
>
>
>
>
> ava.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
> javax.ws.rs-api [46]
> 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:590)
> at javax.ws.rs.core.Response.status(Response.java:601)
> at javax.ws.rs.core.Response.ok(Response.java:622)
> at com.basistech.ws.frontend.util.JsonResponseUtils.returnJsonResponse(JsonResponseUtils.java:59)
> at com.basistech.ws.frontend.service.RaasRsPingService.ping(RaasRsPingService.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[:1.8.0_05]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[:1.8.0_05]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_05]
> at java.lang.reflect.Method.invoke(Method.java:483)[:1.8.0_05]
> at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)[75:org.apache.cxf.cxf-core:3.1.1]
> at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)[75:org.apache.cxf.cxf-core:3.1.1]
> at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)[88:org.apache.cxf.cxf-rt-frontend-jaxrs:3.1.1]