You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2012/11/06 15:30:47 UTC

Re: [CXF DOSGi] Jetty and multi-services

Hi Marco
On 25/10/12 22:09, Marco Speranza wrote:
> Hi,
>
> tnx for your reply :)
>
> if  /greeter starts by it's self, (without /greater2), it works fine.
>
> it seems that the second one "overwrites" the first one?  Can this be possible?
>

Sorry for a delay. I've just rerun a greeter_rest demo, where 
"/greeter", "/greeter2" (as well as "/rest/service") are available.

I can start from testing "/greeter2", and then "/greeter" works as expected.

Can you please open DOSGi CXF JIRA and attach a custom bundle (or, 
preferably, a maven-based project that can create the bundle) ?

I'll have a look early next week.

By the way, what is different in your environment from the basic one I'm 
testing the demo in ? (I'm simply starting a Felix server)

Thanks, Sergey

> ciao :)
>
>
> --
> Marco Speranza<ma...@gmail.com>
>
> Flick photostream: http://www.flickr.com/photos/marcosperanza79/
> Google Code: http://code.google.com/u/marco.speranza79/
>
>
>
> Il giorno 25/ott/2012, alle ore 23:02, Sergey Beryozkin<sb...@gmail.com>  ha scritto:
>
>> On 25/10/12 22:00, Sergey Beryozkin wrote:
>>> Hi, sorry I did not have time today to experiment.
>>>
>>> What happens if you start from accessing "/greeter" first, does
>>> "/greeter2" becomes unaccessible ? Or "/greeter" is not visible at all ?
>>>
>>> I'll have more into it next week as I'm tomorrow and Monday
>>
>> Well, my typing is not something I seem to be able to control at the moment. I'll look into it next week :-)
>>
>> Sergey
>>
>>>
>>> Sergey
>>>
>>> On 24/10/12 22:18, Marco Speranza wrote:
>>>> Hi all,
>>>> I'm trying to register two REST service into Jetty using CXF multi
>>>> bundle distro, but it seems that only the last service is correctly
>>>> register and deploy.
>>>>
>>>> I try to explain my configuration:
>>>>
>>>> my OSGI Activator is:
>>>>
>>>> public void start(BundleContext bc) throws Exception {
>>>>
>>>> Dictionary props = getProperties("/greeter");
>>>> registration = bc.registerService(CategoryServiceRest.class.getName(),
>>>> new CategoryServiceRestImpl(), props);
>>>>
>>>> props = getProperties("/greeter2");
>>>> registration = bc.registerService(SessionServiceRest.class.getName(),
>>>> new SessionServiceRestImpl(), props);
>>>>
>>>> }
>>>>
>>>> private Dictionary getProperties(String address) {
>>>> Dictionary props = new Hashtable();
>>>>
>>>> props.put("service.exported.interfaces", "*");
>>>> props.put("service.exported.configs", "org.apache.cxf.rs");
>>>> props.put("service.exported.intents", "HTTP");
>>>> props.put("org.apache.cxf.rs.httpservice.context", address);
>>>> props.put("org.apache.cxf.rs.provider",
>>>> "org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider");
>>>>
>>>> return props;
>>>> }
>>>>
>>>>
>>>> when I invoke the Session REST WS all work fine but when I try to
>>>> invoke greeter/category web service I experienced this error:
>>>>
>>>> 2012-10-24 23:05:31,116 | WARN | qtp1188024874-85 | JAXRSInInterceptor
>>>> | 92 - org.apache.cxf.bundle-minimal - 2.5.2 | No root resource
>>>> matching request path /greeter/category/getRoots has been found,
>>>> Relative Path: /greeter/category/getRoots. Please enable FINE/TRACE
>>>> log level for more details.
>>>> 2012-10-24 23:05:31,123 | WARN | qtp1188024874-85 |
>>>> WebApplicationExceptionMapper | 92 - org.apache.cxf.bundle-minimal -
>>>> 2.5.2 | WebApplicationException has been caught : no cause is available
>>>>
>>>>
>>>> Can anyone help me?
>>>>
>>>> thanks in advance
>>>>
>>>> --
>>>> Marco Speranza<ma...@apache.org>
>>>> Google Code: http://code.google.com/u/marco.speranza79/
>>>>
>>>
>>>
>>
>>
>> --
>> Sergey Beryozkin
>>
>> Talend Community Coders
>> http://coders.talend.com/
>>
>> Blog: http://sberyozkin.blogspot.com
>

Re: [CXF DOSGi] Jetty and multi-services

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Marco

This issue is now reproducible on the trunk.
Can you clarify please, what exactly have you changed in the 
multi-bundle distribution (which in DOSGI 1.3.1 depends on CXF 2.5.x) ?

This might help us isolate the issue

Thanks, Sergey



On 06/11/12 14:30, Sergey Beryozkin wrote:
> Hi Marco
> On 25/10/12 22:09, Marco Speranza wrote:
>> Hi,
>>
>> tnx for your reply :)
>>
>> if /greeter starts by it's self, (without /greater2), it works fine.
>>
>> it seems that the second one "overwrites" the first one? Can this be
>> possible?
>>
>
> Sorry for a delay. I've just rerun a greeter_rest demo, where
> "/greeter", "/greeter2" (as well as "/rest/service") are available.
>
> I can start from testing "/greeter2", and then "/greeter" works as
> expected.
>
> Can you please open DOSGi CXF JIRA and attach a custom bundle (or,
> preferably, a maven-based project that can create the bundle) ?
>
> I'll have a look early next week.
>
> By the way, what is different in your environment from the basic one I'm
> testing the demo in ? (I'm simply starting a Felix server)
>
> Thanks, Sergey
>
>> ciao :)
>>
>>
>> --
>> Marco Speranza<ma...@gmail.com>
>>
>> Flick photostream: http://www.flickr.com/photos/marcosperanza79/
>> Google Code: http://code.google.com/u/marco.speranza79/
>>
>>
>>
>> Il giorno 25/ott/2012, alle ore 23:02, Sergey
>> Beryozkin<sb...@gmail.com> ha scritto:
>>
>>> On 25/10/12 22:00, Sergey Beryozkin wrote:
>>>> Hi, sorry I did not have time today to experiment.
>>>>
>>>> What happens if you start from accessing "/greeter" first, does
>>>> "/greeter2" becomes unaccessible ? Or "/greeter" is not visible at
>>>> all ?
>>>>
>>>> I'll have more into it next week as I'm tomorrow and Monday
>>>
>>> Well, my typing is not something I seem to be able to control at the
>>> moment. I'll look into it next week :-)
>>>
>>> Sergey
>>>
>>>>
>>>> Sergey
>>>>
>>>> On 24/10/12 22:18, Marco Speranza wrote:
>>>>> Hi all,
>>>>> I'm trying to register two REST service into Jetty using CXF multi
>>>>> bundle distro, but it seems that only the last service is correctly
>>>>> register and deploy.
>>>>>
>>>>> I try to explain my configuration:
>>>>>
>>>>> my OSGI Activator is:
>>>>>
>>>>> public void start(BundleContext bc) throws Exception {
>>>>>
>>>>> Dictionary props = getProperties("/greeter");
>>>>> registration = bc.registerService(CategoryServiceRest.class.getName(),
>>>>> new CategoryServiceRestImpl(), props);
>>>>>
>>>>> props = getProperties("/greeter2");
>>>>> registration = bc.registerService(SessionServiceRest.class.getName(),
>>>>> new SessionServiceRestImpl(), props);
>>>>>
>>>>> }
>>>>>
>>>>> private Dictionary getProperties(String address) {
>>>>> Dictionary props = new Hashtable();
>>>>>
>>>>> props.put("service.exported.interfaces", "*");
>>>>> props.put("service.exported.configs", "org.apache.cxf.rs");
>>>>> props.put("service.exported.intents", "HTTP");
>>>>> props.put("org.apache.cxf.rs.httpservice.context", address);
>>>>> props.put("org.apache.cxf.rs.provider",
>>>>> "org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider");
>>>>>
>>>>> return props;
>>>>> }
>>>>>
>>>>>
>>>>> when I invoke the Session REST WS all work fine but when I try to
>>>>> invoke greeter/category web service I experienced this error:
>>>>>
>>>>> 2012-10-24 23:05:31,116 | WARN | qtp1188024874-85 | JAXRSInInterceptor
>>>>> | 92 - org.apache.cxf.bundle-minimal - 2.5.2 | No root resource
>>>>> matching request path /greeter/category/getRoots has been found,
>>>>> Relative Path: /greeter/category/getRoots. Please enable FINE/TRACE
>>>>> log level for more details.
>>>>> 2012-10-24 23:05:31,123 | WARN | qtp1188024874-85 |
>>>>> WebApplicationExceptionMapper | 92 - org.apache.cxf.bundle-minimal -
>>>>> 2.5.2 | WebApplicationException has been caught : no cause is
>>>>> available
>>>>>
>>>>>
>>>>> Can anyone help me?
>>>>>
>>>>> thanks in advance
>>>>>
>>>>> --
>>>>> Marco Speranza<ma...@apache.org>
>>>>> Google Code: http://code.google.com/u/marco.speranza79/
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> Talend Community Coders
>>> http://coders.talend.com/
>>>
>>> Blog: http://sberyozkin.blogspot.com
>>