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/07/24 15:29:13 UTC

Karaf, CXF, classloading, debugging

Boy did I just get confused.

If you stop a bundle containing a CXF service, update it, and start
it, CXF will, for some reason, no longer see the annotation classes,
and will decide that the service bean has no useful methods.

This is slightly annoying when debugging, but would be a big problem
for live management.

Is there something I might be doing wrong to provoke this?

Re: Karaf, CXF, classloading, debugging

Posted by Benson Margulies <be...@basistech.com>.
On Fri, Jul 24, 2015 at 10:14 AM, Sergey Beryozkin <sb...@gmail.com> wrote:
> CXF uses 2.0.1 version, but 2.0.0 spec bundle should cover 2.0.1, right ?

To wrap up this thread:

The pom for my service declared an ordinary compile-time dependency on
cxf-rt-frontend-jaxrs.

This, in turn, called for:

javax.ws.rs:javax.ws.rs-api:jar:2.0.1

I didn't do anything to exclude this from consideration by the
karaf-maven-plugin, so my feature ended up calling for it.

I fixed it by marking the CXF dependency 'provided', since I'm
expecting the entire CXF feature to be installed separately in the
first instance.

Re: Karaf, CXF, classloading, debugging

Posted by Sergey Beryozkin <sb...@gmail.com>.
CXF uses 2.0.1 version, but 2.0.0 spec bundle should cover 2.0.1, right ?

Cheers, Sergey
On 24/07/15 17:01, Benson Margulies wrote:
> In an empty framework, there is nothing exporting that package.
>
> Then,
>
> Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
> karaf@root()> feature:install cxf
> karaf@root()> exports | grep javax.ws.rs
> javax.ws.rs.client
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.container
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.core
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.ext
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
>
> I install my stuff, and now I've got:
>
> karaf@root()> kar:install
> file:/users/benson/x/anvils/kar/target/rosapi-endpoint.kar
> karaf@root()> exports | grep javax.ws.rs
> javax.ws.rs.client
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.client
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
> javax.ws.rs.container
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.container
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
> javax.ws.rs.core
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.core
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
> javax.ws.rs.ext
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.ext
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
> javax.ws.rs
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
>
> The karaf-maven-plugin has helpfully added:
>
> <bundle start-level="80">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
>
> as a bundle due to a transitive dependency.
>
> I guess that I need to stop using the karaf-maven-plugin to gen my
> feature.xml to get rid of this particular lovely muddle. By why does
> the CXF feature set up this way?
>
>
> On Fri, Jul 24, 2015 at 9:53 AM, Benson Margulies <be...@basistech.com> wrote:
>> this looks suspicious:
>>
>> javax.ws.rs
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs
>>                                  | 2.0.1            | 172 |
>> javax.ws.rs-api
>>
>> The  question is: what do I do about it?
>>
>>
>> On Fri, Jul 24, 2015 at 9:48 AM, Benson Margulies <be...@basistech.com> wrote:
>>> Dan,
>>>
>>> When I completely cleaned out the container, rebuild my stuff out to a
>>> KAR, and restarted, my service works, except when I try to click
>>> through into the WADL, and I get the following.
>>>
>>> I will try to recreate the problem with the annotations, if you would
>>> tell me what to type at the karaf prompt to investigate the package as
>>> you requested.
>>>
>>>
>>> HTTP ERROR 500
>>>
>>> Problem accessing /cxf/annotator. Reason:
>>>
>>>      Server Error
>>>
>>> Caused by:
>>>
>>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>> javax.ws.rs-api [172]
>>> 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.MediaType.toString(MediaType.java:402)
>>> at java.lang.String.valueOf(String.java:2847)
>>> at java.lang.StringBuilder.append(StringBuilder.java:128)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleFormRepresentation(WadlGenerator.java:1064)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:579)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleResource(WadlGenerator.java:402)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:310)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.doFilter(WadlGenerator.java:237)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.filter(WadlGenerator.java:195
>>>
>>> On Fri, Jul 24, 2015 at 9:41 AM, Daniel Kulp <dk...@apache.org> wrote:
>>>> Can you check the list of bundles you have installed to see if there are multiple bundles exporting the java.ws.rs package?   Maybe two different versions of the jaxrs api?
>>>>
>>>> Dan
>>>>
>>>>
>>>>
>>>>> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>>>>
>>>>> Export-Package: com.basistech.raas.annotatorservice;version="0.0.1";uses
>>>>> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
>>>>> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
>>>>> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
>>>>> asterxml.jackson.annotation"
>>>>> Implementation-Title: rosapi-worker-service
>>>>> Implementation-Vendor: Basis Technology Corp.
>>>>> Implementation-Vendor-Id: com.basistech.ws
>>>>> Implementation-Version: 0.0.1-SNAPSHOT
>>>>> Import-Package: com.basistech.rosette,com.basistech.rosette.dm;version="
>>>>> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
>>>>> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
>>>>> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
>>>>> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
>>>>> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
>>>>> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
>>>>> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
>>>>> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
>>>>> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
>>>>> ion="[1.0.0,2.0.0)"
>>>>>
>>>>> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>>>>> It works *sometimes* and not others.
>>>>>>
>>>>>> In the debugger, I see that the annotations themselves are Proxy
>>>>>> instances; I'm not sure if that's the source of the trouble.
>>>>>>
>>>>>> Here is the relevant subset of the manifest:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>>>>> Maybe your import is not correct. I guess that you correctly import the
>>>>>>> annotation bundle (and not re-export it). Correct ?
>>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>>
>>>>>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>>>>>>
>>>>>>>> Boy did I just get confused.
>>>>>>>>
>>>>>>>> If you stop a bundle containing a CXF service, update it, and start
>>>>>>>> it, CXF will, for some reason, no longer see the annotation classes,
>>>>>>>> and will decide that the service bean has no useful methods.
>>>>>>>>
>>>>>>>> This is slightly annoying when debugging, but would be a big problem
>>>>>>>> for live management.
>>>>>>>>
>>>>>>>> Is there something I might be doing wrong to provoke this?
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Jean-Baptiste Onofré
>>>>>>> jbonofre@apache.org
>>>>>>> http://blog.nanthrax.net
>>>>>>> Talend - http://www.talend.com
>>>>
>>>> --
>>>> Daniel Kulp
>>>> dkulp@apache.org - http://dankulp.com/blog
>>>> Talend Community Coder - http://coders.talend.com
>>>>


Re: Karaf, CXF, classloading, debugging

Posted by Benson Margulies <be...@basistech.com>.
On Fri, Jul 24, 2015 at 10:12 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> I don't talk about patch (or if you see something missing), but just use the
> correct <configuration/> to the maven plugin.

OK, I'll go read the source of the plugin and see the options.


>
> Regards
> JB
>
> On 07/24/2015 04:08 PM, Benson Margulies wrote:
>>
>> On Fri, Jul 24, 2015 at 10:03 AM, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> wrote:
>>>
>>> Hi Benson,
>>>
>>> as said earlier, if you want complete control, you should add option to
>>> the
>>> features plugin (to exclude some dependencies for instance),
>>
>>
>> As in, offer a patch? OK, once I get a bit of the way out of the current
>> swamp.
>>
>>
>>
>>   or manage your
>>>
>>> feature.xml by hand (by the game of transitive features).
>>>
>>> Regards
>>> JB
>>>
>>> On 07/24/2015 04:01 PM, Benson Margulies wrote:
>>>>
>>>>
>>>> In an empty framework, there is nothing exporting that package.
>>>>
>>>> Then,
>>>>
>>>> Adding feature url
>>>> mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
>>>> karaf@root()> feature:install cxf
>>>> karaf@root()> exports | grep javax.ws.rs
>>>> javax.ws.rs.client
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs.container
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs.core
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs.ext
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>>
>>>> I install my stuff, and now I've got:
>>>>
>>>> karaf@root()> kar:install
>>>> file:/users/benson/x/anvils/kar/target/rosapi-endpoint.kar
>>>> karaf@root()> exports | grep javax.ws.rs
>>>> javax.ws.rs.client
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs.client
>>>>                                   | 2.0.1            | 172 |
>>>> javax.ws.rs-api
>>>> javax.ws.rs.container
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs.container
>>>>                                   | 2.0.1            | 172 |
>>>> javax.ws.rs-api
>>>> javax.ws.rs.core
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs.core
>>>>                                   | 2.0.1            | 172 |
>>>> javax.ws.rs-api
>>>> javax.ws.rs.ext
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs.ext
>>>>                                   | 2.0.1            | 172 |
>>>> javax.ws.rs-api
>>>> javax.ws.rs
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs
>>>>                                   | 2.0.1            | 172 |
>>>> javax.ws.rs-api
>>>>
>>>> The karaf-maven-plugin has helpfully added:
>>>>
>>>> <bundle start-level="80">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
>>>>
>>>> as a bundle due to a transitive dependency.
>>>>
>>>> I guess that I need to stop using the karaf-maven-plugin to gen my
>>>> feature.xml to get rid of this particular lovely muddle. By why does
>>>> the CXF feature set up this way?
>>>>
>>>>
>>>> On Fri, Jul 24, 2015 at 9:53 AM, Benson Margulies <be...@basistech.com>
>>>> wrote:
>>>>>
>>>>>
>>>>> this looks suspicious:
>>>>>
>>>>> javax.ws.rs
>>>>>                                   | 2.0.0            | 118 |
>>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>>> javax.ws.rs
>>>>>                                   | 2.0.1            | 172 |
>>>>> javax.ws.rs-api
>>>>>
>>>>> The  question is: what do I do about it?
>>>>>
>>>>>
>>>>> On Fri, Jul 24, 2015 at 9:48 AM, Benson Margulies
>>>>> <be...@basistech.com>
>>>>> wrote:
>>>>>>
>>>>>>
>>>>>> Dan,
>>>>>>
>>>>>> When I completely cleaned out the container, rebuild my stuff out to a
>>>>>> KAR, and restarted, my service works, except when I try to click
>>>>>> through into the WADL, and I get the following.
>>>>>>
>>>>>> I will try to recreate the problem with the annotations, if you would
>>>>>> tell me what to type at the karaf prompt to investigate the package as
>>>>>> you requested.
>>>>>>
>>>>>>
>>>>>> HTTP ERROR 500
>>>>>>
>>>>>> Problem accessing /cxf/annotator. Reason:
>>>>>>
>>>>>>       Server Error
>>>>>>
>>>>>> Caused by:
>>>>>>
>>>>>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>>>> javax.ws.rs-api [172]
>>>>>> 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.MediaType.toString(MediaType.java:402)
>>>>>> at java.lang.String.valueOf(String.java:2847)
>>>>>> at java.lang.StringBuilder.append(StringBuilder.java:128)
>>>>>> at
>>>>>>
>>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleFormRepresentation(WadlGenerator.java:1064)
>>>>>> at
>>>>>>
>>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:579)
>>>>>> at
>>>>>>
>>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleResource(WadlGenerator.java:402)
>>>>>> at
>>>>>>
>>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:310)
>>>>>> at
>>>>>>
>>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.doFilter(WadlGenerator.java:237)
>>>>>> at
>>>>>>
>>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.filter(WadlGenerator.java:195
>>>>>>
>>>>>> On Fri, Jul 24, 2015 at 9:41 AM, Daniel Kulp <dk...@apache.org> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Can you check the list of bundles you have installed to see if there
>>>>>>> are multiple bundles exporting the java.ws.rs package?   Maybe two
>>>>>>> different
>>>>>>> versions of the jaxrs api?
>>>>>>>
>>>>>>> Dan
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Export-Package:
>>>>>>>> com.basistech.raas.annotatorservice;version="0.0.1";uses
>>>>>>>>
>>>>>>>>
>>>>>>>> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
>>>>>>>>
>>>>>>>>
>>>>>>>> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
>>>>>>>>
>>>>>>>>
>>>>>>>> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
>>>>>>>> asterxml.jackson.annotation"
>>>>>>>> Implementation-Title: rosapi-worker-service
>>>>>>>> Implementation-Vendor: Basis Technology Corp.
>>>>>>>> Implementation-Vendor-Id: com.basistech.ws
>>>>>>>> Implementation-Version: 0.0.1-SNAPSHOT
>>>>>>>> Import-Package:
>>>>>>>> com.basistech.rosette,com.basistech.rosette.dm;version="
>>>>>>>>
>>>>>>>>
>>>>>>>> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
>>>>>>>>
>>>>>>>>
>>>>>>>> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
>>>>>>>>
>>>>>>>>
>>>>>>>> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
>>>>>>>>
>>>>>>>>
>>>>>>>> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
>>>>>>>>
>>>>>>>>
>>>>>>>> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
>>>>>>>>
>>>>>>>>
>>>>>>>> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
>>>>>>>>
>>>>>>>>
>>>>>>>> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
>>>>>>>>
>>>>>>>>
>>>>>>>> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
>>>>>>>>
>>>>>>>>
>>>>>>>> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
>>>>>>>> ion="[1.0.0,2.0.0)"
>>>>>>>>
>>>>>>>> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies
>>>>>>>> <be...@basistech.com> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> It works *sometimes* and not others.
>>>>>>>>>
>>>>>>>>> In the debugger, I see that the annotations themselves are Proxy
>>>>>>>>> instances; I'm not sure if that's the source of the trouble.
>>>>>>>>>
>>>>>>>>> Here is the relevant subset of the manifest:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré
>>>>>>>>> <jb...@nanthrax.net> wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Maybe your import is not correct. I guess that you correctly
>>>>>>>>>> import
>>>>>>>>>> the
>>>>>>>>>> annotation bundle (and not re-export it). Correct ?
>>>>>>>>>>
>>>>>>>>>> Regards
>>>>>>>>>> JB
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Boy did I just get confused.
>>>>>>>>>>>
>>>>>>>>>>> If you stop a bundle containing a CXF service, update it, and
>>>>>>>>>>> start
>>>>>>>>>>> it, CXF will, for some reason, no longer see the annotation
>>>>>>>>>>> classes,
>>>>>>>>>>> and will decide that the service bean has no useful methods.
>>>>>>>>>>>
>>>>>>>>>>> This is slightly annoying when debugging, but would be a big
>>>>>>>>>>> problem
>>>>>>>>>>> for live management.
>>>>>>>>>>>
>>>>>>>>>>> Is there something I might be doing wrong to provoke this?
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Jean-Baptiste Onofré
>>>>>>>>>> jbonofre@apache.org
>>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>>> Talend - http://www.talend.com
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Daniel Kulp
>>>>>>> dkulp@apache.org - http://dankulp.com/blog
>>>>>>> Talend Community Coder - http://coders.talend.com
>>>>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Re: Karaf, CXF, classloading, debugging

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I don't talk about patch (or if you see something missing), but just use 
the correct <configuration/> to the maven plugin.

Regards
JB

On 07/24/2015 04:08 PM, Benson Margulies wrote:
> On Fri, Jul 24, 2015 at 10:03 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>> Hi Benson,
>>
>> as said earlier, if you want complete control, you should add option to the
>> features plugin (to exclude some dependencies for instance),
>
> As in, offer a patch? OK, once I get a bit of the way out of the current swamp.
>
>
>
>   or manage your
>> feature.xml by hand (by the game of transitive features).
>>
>> Regards
>> JB
>>
>> On 07/24/2015 04:01 PM, Benson Margulies wrote:
>>>
>>> In an empty framework, there is nothing exporting that package.
>>>
>>> Then,
>>>
>>> Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
>>> karaf@root()> feature:install cxf
>>> karaf@root()> exports | grep javax.ws.rs
>>> javax.ws.rs.client
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs.container
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs.core
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs.ext
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>
>>> I install my stuff, and now I've got:
>>>
>>> karaf@root()> kar:install
>>> file:/users/benson/x/anvils/kar/target/rosapi-endpoint.kar
>>> karaf@root()> exports | grep javax.ws.rs
>>> javax.ws.rs.client
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs.client
>>>                                   | 2.0.1            | 172 |
>>> javax.ws.rs-api
>>> javax.ws.rs.container
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs.container
>>>                                   | 2.0.1            | 172 |
>>> javax.ws.rs-api
>>> javax.ws.rs.core
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs.core
>>>                                   | 2.0.1            | 172 |
>>> javax.ws.rs-api
>>> javax.ws.rs.ext
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs.ext
>>>                                   | 2.0.1            | 172 |
>>> javax.ws.rs-api
>>> javax.ws.rs
>>>                                   | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs
>>>                                   | 2.0.1            | 172 |
>>> javax.ws.rs-api
>>>
>>> The karaf-maven-plugin has helpfully added:
>>>
>>> <bundle start-level="80">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
>>>
>>> as a bundle due to a transitive dependency.
>>>
>>> I guess that I need to stop using the karaf-maven-plugin to gen my
>>> feature.xml to get rid of this particular lovely muddle. By why does
>>> the CXF feature set up this way?
>>>
>>>
>>> On Fri, Jul 24, 2015 at 9:53 AM, Benson Margulies <be...@basistech.com>
>>> wrote:
>>>>
>>>> this looks suspicious:
>>>>
>>>> javax.ws.rs
>>>>                                   | 2.0.0            | 118 |
>>>> org.apache.servicemix.specs.jsr339-api-2.0
>>>> javax.ws.rs
>>>>                                   | 2.0.1            | 172 |
>>>> javax.ws.rs-api
>>>>
>>>> The  question is: what do I do about it?
>>>>
>>>>
>>>> On Fri, Jul 24, 2015 at 9:48 AM, Benson Margulies <be...@basistech.com>
>>>> wrote:
>>>>>
>>>>> Dan,
>>>>>
>>>>> When I completely cleaned out the container, rebuild my stuff out to a
>>>>> KAR, and restarted, my service works, except when I try to click
>>>>> through into the WADL, and I get the following.
>>>>>
>>>>> I will try to recreate the problem with the annotations, if you would
>>>>> tell me what to type at the karaf prompt to investigate the package as
>>>>> you requested.
>>>>>
>>>>>
>>>>> HTTP ERROR 500
>>>>>
>>>>> Problem accessing /cxf/annotator. Reason:
>>>>>
>>>>>       Server Error
>>>>>
>>>>> Caused by:
>>>>>
>>>>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>>> javax.ws.rs-api [172]
>>>>> 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.MediaType.toString(MediaType.java:402)
>>>>> at java.lang.String.valueOf(String.java:2847)
>>>>> at java.lang.StringBuilder.append(StringBuilder.java:128)
>>>>> at
>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleFormRepresentation(WadlGenerator.java:1064)
>>>>> at
>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:579)
>>>>> at
>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleResource(WadlGenerator.java:402)
>>>>> at
>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:310)
>>>>> at
>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.doFilter(WadlGenerator.java:237)
>>>>> at
>>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.filter(WadlGenerator.java:195
>>>>>
>>>>> On Fri, Jul 24, 2015 at 9:41 AM, Daniel Kulp <dk...@apache.org> wrote:
>>>>>>
>>>>>> Can you check the list of bundles you have installed to see if there
>>>>>> are multiple bundles exporting the java.ws.rs package?   Maybe two different
>>>>>> versions of the jaxrs api?
>>>>>>
>>>>>> Dan
>>>>>>
>>>>>>
>>>>>>
>>>>>>> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Export-Package:
>>>>>>> com.basistech.raas.annotatorservice;version="0.0.1";uses
>>>>>>>
>>>>>>> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
>>>>>>>
>>>>>>> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
>>>>>>>
>>>>>>> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
>>>>>>> asterxml.jackson.annotation"
>>>>>>> Implementation-Title: rosapi-worker-service
>>>>>>> Implementation-Vendor: Basis Technology Corp.
>>>>>>> Implementation-Vendor-Id: com.basistech.ws
>>>>>>> Implementation-Version: 0.0.1-SNAPSHOT
>>>>>>> Import-Package:
>>>>>>> com.basistech.rosette,com.basistech.rosette.dm;version="
>>>>>>>
>>>>>>> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
>>>>>>>
>>>>>>> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
>>>>>>>
>>>>>>> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
>>>>>>>
>>>>>>> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
>>>>>>>
>>>>>>> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
>>>>>>>
>>>>>>> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
>>>>>>>
>>>>>>> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
>>>>>>>
>>>>>>> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
>>>>>>>
>>>>>>> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
>>>>>>> ion="[1.0.0,2.0.0)"
>>>>>>>
>>>>>>> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies
>>>>>>> <be...@basistech.com> wrote:
>>>>>>>>
>>>>>>>> It works *sometimes* and not others.
>>>>>>>>
>>>>>>>> In the debugger, I see that the annotations themselves are Proxy
>>>>>>>> instances; I'm not sure if that's the source of the trouble.
>>>>>>>>
>>>>>>>> Here is the relevant subset of the manifest:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré
>>>>>>>> <jb...@nanthrax.net> wrote:
>>>>>>>>>
>>>>>>>>> Maybe your import is not correct. I guess that you correctly import
>>>>>>>>> the
>>>>>>>>> annotation bundle (and not re-export it). Correct ?
>>>>>>>>>
>>>>>>>>> Regards
>>>>>>>>> JB
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Boy did I just get confused.
>>>>>>>>>>
>>>>>>>>>> If you stop a bundle containing a CXF service, update it, and start
>>>>>>>>>> it, CXF will, for some reason, no longer see the annotation
>>>>>>>>>> classes,
>>>>>>>>>> and will decide that the service bean has no useful methods.
>>>>>>>>>>
>>>>>>>>>> This is slightly annoying when debugging, but would be a big
>>>>>>>>>> problem
>>>>>>>>>> for live management.
>>>>>>>>>>
>>>>>>>>>> Is there something I might be doing wrong to provoke this?
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Jean-Baptiste Onofré
>>>>>>>>> jbonofre@apache.org
>>>>>>>>> http://blog.nanthrax.net
>>>>>>>>> Talend - http://www.talend.com
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Daniel Kulp
>>>>>> dkulp@apache.org - http://dankulp.com/blog
>>>>>> Talend Community Coder - http://coders.talend.com
>>>>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf, CXF, classloading, debugging

Posted by Benson Margulies <be...@basistech.com>.
On Fri, Jul 24, 2015 at 10:03 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Hi Benson,
>
> as said earlier, if you want complete control, you should add option to the
> features plugin (to exclude some dependencies for instance),

As in, offer a patch? OK, once I get a bit of the way out of the current swamp.



 or manage your
> feature.xml by hand (by the game of transitive features).
>
> Regards
> JB
>
> On 07/24/2015 04:01 PM, Benson Margulies wrote:
>>
>> In an empty framework, there is nothing exporting that package.
>>
>> Then,
>>
>> Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
>> karaf@root()> feature:install cxf
>> karaf@root()> exports | grep javax.ws.rs
>> javax.ws.rs.client
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs.container
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs.core
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs.ext
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>>
>> I install my stuff, and now I've got:
>>
>> karaf@root()> kar:install
>> file:/users/benson/x/anvils/kar/target/rosapi-endpoint.kar
>> karaf@root()> exports | grep javax.ws.rs
>> javax.ws.rs.client
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs.client
>>                                  | 2.0.1            | 172 |
>> javax.ws.rs-api
>> javax.ws.rs.container
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs.container
>>                                  | 2.0.1            | 172 |
>> javax.ws.rs-api
>> javax.ws.rs.core
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs.core
>>                                  | 2.0.1            | 172 |
>> javax.ws.rs-api
>> javax.ws.rs.ext
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs.ext
>>                                  | 2.0.1            | 172 |
>> javax.ws.rs-api
>> javax.ws.rs
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs
>>                                  | 2.0.1            | 172 |
>> javax.ws.rs-api
>>
>> The karaf-maven-plugin has helpfully added:
>>
>> <bundle start-level="80">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
>>
>> as a bundle due to a transitive dependency.
>>
>> I guess that I need to stop using the karaf-maven-plugin to gen my
>> feature.xml to get rid of this particular lovely muddle. By why does
>> the CXF feature set up this way?
>>
>>
>> On Fri, Jul 24, 2015 at 9:53 AM, Benson Margulies <be...@basistech.com>
>> wrote:
>>>
>>> this looks suspicious:
>>>
>>> javax.ws.rs
>>>                                  | 2.0.0            | 118 |
>>> org.apache.servicemix.specs.jsr339-api-2.0
>>> javax.ws.rs
>>>                                  | 2.0.1            | 172 |
>>> javax.ws.rs-api
>>>
>>> The  question is: what do I do about it?
>>>
>>>
>>> On Fri, Jul 24, 2015 at 9:48 AM, Benson Margulies <be...@basistech.com>
>>> wrote:
>>>>
>>>> Dan,
>>>>
>>>> When I completely cleaned out the container, rebuild my stuff out to a
>>>> KAR, and restarted, my service works, except when I try to click
>>>> through into the WADL, and I get the following.
>>>>
>>>> I will try to recreate the problem with the annotations, if you would
>>>> tell me what to type at the karaf prompt to investigate the package as
>>>> you requested.
>>>>
>>>>
>>>> HTTP ERROR 500
>>>>
>>>> Problem accessing /cxf/annotator. Reason:
>>>>
>>>>      Server Error
>>>>
>>>> Caused by:
>>>>
>>>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>>> javax.ws.rs-api [172]
>>>> 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.MediaType.toString(MediaType.java:402)
>>>> at java.lang.String.valueOf(String.java:2847)
>>>> at java.lang.StringBuilder.append(StringBuilder.java:128)
>>>> at
>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleFormRepresentation(WadlGenerator.java:1064)
>>>> at
>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:579)
>>>> at
>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleResource(WadlGenerator.java:402)
>>>> at
>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:310)
>>>> at
>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.doFilter(WadlGenerator.java:237)
>>>> at
>>>> org.apache.cxf.jaxrs.model.wadl.WadlGenerator.filter(WadlGenerator.java:195
>>>>
>>>> On Fri, Jul 24, 2015 at 9:41 AM, Daniel Kulp <dk...@apache.org> wrote:
>>>>>
>>>>> Can you check the list of bundles you have installed to see if there
>>>>> are multiple bundles exporting the java.ws.rs package?   Maybe two different
>>>>> versions of the jaxrs api?
>>>>>
>>>>> Dan
>>>>>
>>>>>
>>>>>
>>>>>> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com>
>>>>>> wrote:
>>>>>>
>>>>>> Export-Package:
>>>>>> com.basistech.raas.annotatorservice;version="0.0.1";uses
>>>>>>
>>>>>> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
>>>>>>
>>>>>> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
>>>>>>
>>>>>> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
>>>>>> asterxml.jackson.annotation"
>>>>>> Implementation-Title: rosapi-worker-service
>>>>>> Implementation-Vendor: Basis Technology Corp.
>>>>>> Implementation-Vendor-Id: com.basistech.ws
>>>>>> Implementation-Version: 0.0.1-SNAPSHOT
>>>>>> Import-Package:
>>>>>> com.basistech.rosette,com.basistech.rosette.dm;version="
>>>>>>
>>>>>> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
>>>>>>
>>>>>> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
>>>>>>
>>>>>> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
>>>>>>
>>>>>> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
>>>>>>
>>>>>> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
>>>>>>
>>>>>> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
>>>>>>
>>>>>> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
>>>>>>
>>>>>> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
>>>>>>
>>>>>> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
>>>>>> ion="[1.0.0,2.0.0)"
>>>>>>
>>>>>> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies
>>>>>> <be...@basistech.com> wrote:
>>>>>>>
>>>>>>> It works *sometimes* and not others.
>>>>>>>
>>>>>>> In the debugger, I see that the annotations themselves are Proxy
>>>>>>> instances; I'm not sure if that's the source of the trouble.
>>>>>>>
>>>>>>> Here is the relevant subset of the manifest:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré
>>>>>>> <jb...@nanthrax.net> wrote:
>>>>>>>>
>>>>>>>> Maybe your import is not correct. I guess that you correctly import
>>>>>>>> the
>>>>>>>> annotation bundle (and not re-export it). Correct ?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> JB
>>>>>>>>
>>>>>>>>
>>>>>>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Boy did I just get confused.
>>>>>>>>>
>>>>>>>>> If you stop a bundle containing a CXF service, update it, and start
>>>>>>>>> it, CXF will, for some reason, no longer see the annotation
>>>>>>>>> classes,
>>>>>>>>> and will decide that the service bean has no useful methods.
>>>>>>>>>
>>>>>>>>> This is slightly annoying when debugging, but would be a big
>>>>>>>>> problem
>>>>>>>>> for live management.
>>>>>>>>>
>>>>>>>>> Is there something I might be doing wrong to provoke this?
>>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Jean-Baptiste Onofré
>>>>>>>> jbonofre@apache.org
>>>>>>>> http://blog.nanthrax.net
>>>>>>>> Talend - http://www.talend.com
>>>>>
>>>>>
>>>>> --
>>>>> Daniel Kulp
>>>>> dkulp@apache.org - http://dankulp.com/blog
>>>>> Talend Community Coder - http://coders.talend.com
>>>>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Re: Karaf, CXF, classloading, debugging

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Benson,

as said earlier, if you want complete control, you should add option to 
the features plugin (to exclude some dependencies for instance), or 
manage your feature.xml by hand (by the game of transitive features).

Regards
JB

On 07/24/2015 04:01 PM, Benson Margulies wrote:
> In an empty framework, there is nothing exporting that package.
>
> Then,
>
> Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
> karaf@root()> feature:install cxf
> karaf@root()> exports | grep javax.ws.rs
> javax.ws.rs.client
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.container
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.core
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.ext
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
>
> I install my stuff, and now I've got:
>
> karaf@root()> kar:install
> file:/users/benson/x/anvils/kar/target/rosapi-endpoint.kar
> karaf@root()> exports | grep javax.ws.rs
> javax.ws.rs.client
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.client
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
> javax.ws.rs.container
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.container
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
> javax.ws.rs.core
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.core
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
> javax.ws.rs.ext
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs.ext
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
> javax.ws.rs
>                                  | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs
>                                  | 2.0.1            | 172 |
> javax.ws.rs-api
>
> The karaf-maven-plugin has helpfully added:
>
> <bundle start-level="80">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
>
> as a bundle due to a transitive dependency.
>
> I guess that I need to stop using the karaf-maven-plugin to gen my
> feature.xml to get rid of this particular lovely muddle. By why does
> the CXF feature set up this way?
>
>
> On Fri, Jul 24, 2015 at 9:53 AM, Benson Margulies <be...@basistech.com> wrote:
>> this looks suspicious:
>>
>> javax.ws.rs
>>                                  | 2.0.0            | 118 |
>> org.apache.servicemix.specs.jsr339-api-2.0
>> javax.ws.rs
>>                                  | 2.0.1            | 172 |
>> javax.ws.rs-api
>>
>> The  question is: what do I do about it?
>>
>>
>> On Fri, Jul 24, 2015 at 9:48 AM, Benson Margulies <be...@basistech.com> wrote:
>>> Dan,
>>>
>>> When I completely cleaned out the container, rebuild my stuff out to a
>>> KAR, and restarted, my service works, except when I try to click
>>> through into the WADL, and I get the following.
>>>
>>> I will try to recreate the problem with the annotations, if you would
>>> tell me what to type at the karaf prompt to investigate the package as
>>> you requested.
>>>
>>>
>>> HTTP ERROR 500
>>>
>>> Problem accessing /cxf/annotator. Reason:
>>>
>>>      Server Error
>>>
>>> Caused by:
>>>
>>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>>> javax.ws.rs-api [172]
>>> 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.MediaType.toString(MediaType.java:402)
>>> at java.lang.String.valueOf(String.java:2847)
>>> at java.lang.StringBuilder.append(StringBuilder.java:128)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleFormRepresentation(WadlGenerator.java:1064)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:579)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleResource(WadlGenerator.java:402)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:310)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.doFilter(WadlGenerator.java:237)
>>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.filter(WadlGenerator.java:195
>>>
>>> On Fri, Jul 24, 2015 at 9:41 AM, Daniel Kulp <dk...@apache.org> wrote:
>>>> Can you check the list of bundles you have installed to see if there are multiple bundles exporting the java.ws.rs package?   Maybe two different versions of the jaxrs api?
>>>>
>>>> Dan
>>>>
>>>>
>>>>
>>>>> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>>>>
>>>>> Export-Package: com.basistech.raas.annotatorservice;version="0.0.1";uses
>>>>> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
>>>>> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
>>>>> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
>>>>> asterxml.jackson.annotation"
>>>>> Implementation-Title: rosapi-worker-service
>>>>> Implementation-Vendor: Basis Technology Corp.
>>>>> Implementation-Vendor-Id: com.basistech.ws
>>>>> Implementation-Version: 0.0.1-SNAPSHOT
>>>>> Import-Package: com.basistech.rosette,com.basistech.rosette.dm;version="
>>>>> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
>>>>> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
>>>>> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
>>>>> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
>>>>> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
>>>>> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
>>>>> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
>>>>> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
>>>>> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
>>>>> ion="[1.0.0,2.0.0)"
>>>>>
>>>>> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>>>>> It works *sometimes* and not others.
>>>>>>
>>>>>> In the debugger, I see that the annotations themselves are Proxy
>>>>>> instances; I'm not sure if that's the source of the trouble.
>>>>>>
>>>>>> Here is the relevant subset of the manifest:
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>>>>> Maybe your import is not correct. I guess that you correctly import the
>>>>>>> annotation bundle (and not re-export it). Correct ?
>>>>>>>
>>>>>>> Regards
>>>>>>> JB
>>>>>>>
>>>>>>>
>>>>>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>>>>>>
>>>>>>>> Boy did I just get confused.
>>>>>>>>
>>>>>>>> If you stop a bundle containing a CXF service, update it, and start
>>>>>>>> it, CXF will, for some reason, no longer see the annotation classes,
>>>>>>>> and will decide that the service bean has no useful methods.
>>>>>>>>
>>>>>>>> This is slightly annoying when debugging, but would be a big problem
>>>>>>>> for live management.
>>>>>>>>
>>>>>>>> Is there something I might be doing wrong to provoke this?
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Jean-Baptiste Onofré
>>>>>>> jbonofre@apache.org
>>>>>>> http://blog.nanthrax.net
>>>>>>> Talend - http://www.talend.com
>>>>
>>>> --
>>>> Daniel Kulp
>>>> dkulp@apache.org - http://dankulp.com/blog
>>>> Talend Community Coder - http://coders.talend.com
>>>>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf, CXF, classloading, debugging

Posted by Benson Margulies <be...@basistech.com>.
In an empty framework, there is nothing exporting that package.

Then,

Adding feature url mvn:org.apache.cxf.karaf/apache-cxf/3.1.1/xml/features
karaf@root()> feature:install cxf
karaf@root()> exports | grep javax.ws.rs
javax.ws.rs.client
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs.container
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs.core
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs.ext
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0

I install my stuff, and now I've got:

karaf@root()> kar:install
file:/users/benson/x/anvils/kar/target/rosapi-endpoint.kar
karaf@root()> exports | grep javax.ws.rs
javax.ws.rs.client
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs.client
                                | 2.0.1            | 172 |
javax.ws.rs-api
javax.ws.rs.container
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs.container
                                | 2.0.1            | 172 |
javax.ws.rs-api
javax.ws.rs.core
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs.core
                                | 2.0.1            | 172 |
javax.ws.rs-api
javax.ws.rs.ext
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs.ext
                                | 2.0.1            | 172 |
javax.ws.rs-api
javax.ws.rs
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs
                                | 2.0.1            | 172 |
javax.ws.rs-api

The karaf-maven-plugin has helpfully added:

<bundle start-level="80">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>

as a bundle due to a transitive dependency.

I guess that I need to stop using the karaf-maven-plugin to gen my
feature.xml to get rid of this particular lovely muddle. By why does
the CXF feature set up this way?


On Fri, Jul 24, 2015 at 9:53 AM, Benson Margulies <be...@basistech.com> wrote:
> this looks suspicious:
>
> javax.ws.rs
>                                 | 2.0.0            | 118 |
> org.apache.servicemix.specs.jsr339-api-2.0
> javax.ws.rs
>                                 | 2.0.1            | 172 |
> javax.ws.rs-api
>
> The  question is: what do I do about it?
>
>
> On Fri, Jul 24, 2015 at 9:48 AM, Benson Margulies <be...@basistech.com> wrote:
>> Dan,
>>
>> When I completely cleaned out the container, rebuild my stuff out to a
>> KAR, and restarted, my service works, except when I try to click
>> through into the WADL, and I get the following.
>>
>> I will try to recreate the problem with the annotations, if you would
>> tell me what to type at the karaf prompt to investigate the package as
>> you requested.
>>
>>
>> HTTP ERROR 500
>>
>> Problem accessing /cxf/annotator. Reason:
>>
>>     Server Error
>>
>> Caused by:
>>
>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
>> javax.ws.rs-api [172]
>> 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.MediaType.toString(MediaType.java:402)
>> at java.lang.String.valueOf(String.java:2847)
>> at java.lang.StringBuilder.append(StringBuilder.java:128)
>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleFormRepresentation(WadlGenerator.java:1064)
>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:579)
>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleResource(WadlGenerator.java:402)
>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:310)
>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.doFilter(WadlGenerator.java:237)
>> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.filter(WadlGenerator.java:195
>>
>> On Fri, Jul 24, 2015 at 9:41 AM, Daniel Kulp <dk...@apache.org> wrote:
>>> Can you check the list of bundles you have installed to see if there are multiple bundles exporting the java.ws.rs package?   Maybe two different versions of the jaxrs api?
>>>
>>> Dan
>>>
>>>
>>>
>>>> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>>>
>>>> Export-Package: com.basistech.raas.annotatorservice;version="0.0.1";uses
>>>> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
>>>> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
>>>> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
>>>> asterxml.jackson.annotation"
>>>> Implementation-Title: rosapi-worker-service
>>>> Implementation-Vendor: Basis Technology Corp.
>>>> Implementation-Vendor-Id: com.basistech.ws
>>>> Implementation-Version: 0.0.1-SNAPSHOT
>>>> Import-Package: com.basistech.rosette,com.basistech.rosette.dm;version="
>>>> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
>>>> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
>>>> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
>>>> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
>>>> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
>>>> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
>>>> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
>>>> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
>>>> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
>>>> ion="[1.0.0,2.0.0)"
>>>>
>>>> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>>>> It works *sometimes* and not others.
>>>>>
>>>>> In the debugger, I see that the annotations themselves are Proxy
>>>>> instances; I'm not sure if that's the source of the trouble.
>>>>>
>>>>> Here is the relevant subset of the manifest:
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>>>> Maybe your import is not correct. I guess that you correctly import the
>>>>>> annotation bundle (and not re-export it). Correct ?
>>>>>>
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>>
>>>>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>>>>>
>>>>>>> Boy did I just get confused.
>>>>>>>
>>>>>>> If you stop a bundle containing a CXF service, update it, and start
>>>>>>> it, CXF will, for some reason, no longer see the annotation classes,
>>>>>>> and will decide that the service bean has no useful methods.
>>>>>>>
>>>>>>> This is slightly annoying when debugging, but would be a big problem
>>>>>>> for live management.
>>>>>>>
>>>>>>> Is there something I might be doing wrong to provoke this?
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>
>>> --
>>> Daniel Kulp
>>> dkulp@apache.org - http://dankulp.com/blog
>>> Talend Community Coder - http://coders.talend.com
>>>

Re: Karaf, CXF, classloading, debugging

Posted by Benson Margulies <be...@basistech.com>.
this looks suspicious:

javax.ws.rs
                                | 2.0.0            | 118 |
org.apache.servicemix.specs.jsr339-api-2.0
javax.ws.rs
                                | 2.0.1            | 172 |
javax.ws.rs-api

The  question is: what do I do about it?


On Fri, Jul 24, 2015 at 9:48 AM, Benson Margulies <be...@basistech.com> wrote:
> Dan,
>
> When I completely cleaned out the container, rebuild my stuff out to a
> KAR, and restarted, my service works, except when I try to click
> through into the WADL, and I get the following.
>
> I will try to recreate the problem with the annotations, if you would
> tell me what to type at the karaf prompt to investigate the package as
> you requested.
>
>
> HTTP ERROR 500
>
> Problem accessing /cxf/annotator. Reason:
>
>     Server Error
>
> Caused by:
>
> java.lang.RuntimeException: java.lang.ClassNotFoundException:
> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
> javax.ws.rs-api [172]
> 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.MediaType.toString(MediaType.java:402)
> at java.lang.String.valueOf(String.java:2847)
> at java.lang.StringBuilder.append(StringBuilder.java:128)
> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleFormRepresentation(WadlGenerator.java:1064)
> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:579)
> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleResource(WadlGenerator.java:402)
> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:310)
> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.doFilter(WadlGenerator.java:237)
> at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.filter(WadlGenerator.java:195
>
> On Fri, Jul 24, 2015 at 9:41 AM, Daniel Kulp <dk...@apache.org> wrote:
>> Can you check the list of bundles you have installed to see if there are multiple bundles exporting the java.ws.rs package?   Maybe two different versions of the jaxrs api?
>>
>> Dan
>>
>>
>>
>>> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>>
>>> Export-Package: com.basistech.raas.annotatorservice;version="0.0.1";uses
>>> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
>>> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
>>> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
>>> asterxml.jackson.annotation"
>>> Implementation-Title: rosapi-worker-service
>>> Implementation-Vendor: Basis Technology Corp.
>>> Implementation-Vendor-Id: com.basistech.ws
>>> Implementation-Version: 0.0.1-SNAPSHOT
>>> Import-Package: com.basistech.rosette,com.basistech.rosette.dm;version="
>>> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
>>> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
>>> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
>>> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
>>> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
>>> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
>>> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
>>> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
>>> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
>>> ion="[1.0.0,2.0.0)"
>>>
>>> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>>> It works *sometimes* and not others.
>>>>
>>>> In the debugger, I see that the annotations themselves are Proxy
>>>> instances; I'm not sure if that's the source of the trouble.
>>>>
>>>> Here is the relevant subset of the manifest:
>>>>
>>>>
>>>>
>>>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>>> Maybe your import is not correct. I guess that you correctly import the
>>>>> annotation bundle (and not re-export it). Correct ?
>>>>>
>>>>> Regards
>>>>> JB
>>>>>
>>>>>
>>>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>>>>
>>>>>> Boy did I just get confused.
>>>>>>
>>>>>> If you stop a bundle containing a CXF service, update it, and start
>>>>>> it, CXF will, for some reason, no longer see the annotation classes,
>>>>>> and will decide that the service bean has no useful methods.
>>>>>>
>>>>>> This is slightly annoying when debugging, but would be a big problem
>>>>>> for live management.
>>>>>>
>>>>>> Is there something I might be doing wrong to provoke this?
>>>>>>
>>>>>
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>>

Re: Karaf, CXF, classloading, debugging

Posted by Benson Margulies <be...@basistech.com>.
Dan,

When I completely cleaned out the container, rebuild my stuff out to a
KAR, and restarted, my service works, except when I try to click
through into the WADL, and I get the following.

I will try to recreate the problem with the annotations, if you would
tell me what to type at the karaf prompt to investigate the package as
you requested.


HTTP ERROR 500

Problem accessing /cxf/annotator. Reason:

    Server Error

Caused by:

java.lang.RuntimeException: java.lang.ClassNotFoundException:
org.glassfish.jersey.internal.RuntimeDelegateImpl not found by
javax.ws.rs-api [172]
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.MediaType.toString(MediaType.java:402)
at java.lang.String.valueOf(String.java:2847)
at java.lang.StringBuilder.append(StringBuilder.java:128)
at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleFormRepresentation(WadlGenerator.java:1064)
at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleOperation(WadlGenerator.java:579)
at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.handleResource(WadlGenerator.java:402)
at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.generateWADL(WadlGenerator.java:310)
at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.doFilter(WadlGenerator.java:237)
at org.apache.cxf.jaxrs.model.wadl.WadlGenerator.filter(WadlGenerator.java:195

On Fri, Jul 24, 2015 at 9:41 AM, Daniel Kulp <dk...@apache.org> wrote:
> Can you check the list of bundles you have installed to see if there are multiple bundles exporting the java.ws.rs package?   Maybe two different versions of the jaxrs api?
>
> Dan
>
>
>
>> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>
>> Export-Package: com.basistech.raas.annotatorservice;version="0.0.1";uses
>> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
>> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
>> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
>> asterxml.jackson.annotation"
>> Implementation-Title: rosapi-worker-service
>> Implementation-Vendor: Basis Technology Corp.
>> Implementation-Vendor-Id: com.basistech.ws
>> Implementation-Version: 0.0.1-SNAPSHOT
>> Import-Package: com.basistech.rosette,com.basistech.rosette.dm;version="
>> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
>> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
>> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
>> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
>> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
>> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
>> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
>> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
>> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
>> ion="[1.0.0,2.0.0)"
>>
>> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>>> It works *sometimes* and not others.
>>>
>>> In the debugger, I see that the annotations themselves are Proxy
>>> instances; I'm not sure if that's the source of the trouble.
>>>
>>> Here is the relevant subset of the manifest:
>>>
>>>
>>>
>>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>>> Maybe your import is not correct. I guess that you correctly import the
>>>> annotation bundle (and not re-export it). Correct ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>>>
>>>>> Boy did I just get confused.
>>>>>
>>>>> If you stop a bundle containing a CXF service, update it, and start
>>>>> it, CXF will, for some reason, no longer see the annotation classes,
>>>>> and will decide that the service bean has no useful methods.
>>>>>
>>>>> This is slightly annoying when debugging, but would be a big problem
>>>>> for live management.
>>>>>
>>>>> Is there something I might be doing wrong to provoke this?
>>>>>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>

Re: Karaf, CXF, classloading, debugging

Posted by Daniel Kulp <dk...@apache.org>.
Can you check the list of bundles you have installed to see if there are multiple bundles exporting the java.ws.rs package?   Maybe two different versions of the jaxrs api?

Dan



> On Jul 24, 2015, at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
> 
> Export-Package: com.basistech.raas.annotatorservice;version="0.0.1";uses
> :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
> e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
> com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
> asterxml.jackson.annotation"
> Implementation-Title: rosapi-worker-service
> Implementation-Vendor: Basis Technology Corp.
> Implementation-Vendor-Id: com.basistech.ws
> Implementation-Version: 0.0.1-SNAPSHOT
> Import-Package: com.basistech.rosette,com.basistech.rosette.dm;version="
> [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
> tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
> sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
> asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
> version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
> )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
> ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
> xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
> )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
> ion="[1.0.0,2.0.0)"
> 
> On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
>> It works *sometimes* and not others.
>> 
>> In the debugger, I see that the annotations themselves are Proxy
>> instances; I'm not sure if that's the source of the trouble.
>> 
>> Here is the relevant subset of the manifest:
>> 
>> 
>> 
>> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>>> Maybe your import is not correct. I guess that you correctly import the
>>> annotation bundle (and not re-export it). Correct ?
>>> 
>>> Regards
>>> JB
>>> 
>>> 
>>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>> 
>>>> Boy did I just get confused.
>>>> 
>>>> If you stop a bundle containing a CXF service, update it, and start
>>>> it, CXF will, for some reason, no longer see the annotation classes,
>>>> and will decide that the service bean has no useful methods.
>>>> 
>>>> This is slightly annoying when debugging, but would be a big problem
>>>> for live management.
>>>> 
>>>> Is there something I might be doing wrong to provoke this?
>>>> 
>>> 
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Karaf, CXF, classloading, debugging

Posted by Benson Margulies <be...@basistech.com>.
Export-Package: com.basistech.raas.annotatorservice;version="0.0.1";uses
 :="com.basistech.rosette,com.basistech.rosette.dm,javax.ws.rs,org.apach
 e.cxf.jaxrs.ext,org.apache.cxf.jaxrs.ext.multipart,org.osgi.framework",
 com.basistech.raas.annotatorservice.config;version="0.0.1";uses:="com.f
 asterxml.jackson.annotation"
Implementation-Title: rosapi-worker-service
Implementation-Vendor: Basis Technology Corp.
Implementation-Vendor-Id: com.basistech.ws
Implementation-Version: 0.0.1-SNAPSHOT
Import-Package: com.basistech.rosette,com.basistech.rosette.dm;version="
 [1.12,2)",com.basistech.rosette.dm.jackson;version="[1.12,2)",com.basis
 tech.rosette.osgi;version="[1.0,2)",com.basistech.rosette.osgi.util;ver
 sion="[1.0,2)",com.fasterxml.jackson.annotation;version="[2.4,3)",com.f
 asterxml.jackson.core;version="[2.4,3)",com.fasterxml.jackson.databind;
 version="[2.4,3)",com.fasterxml.jackson.dataformat.yaml;version="[2.4,3
 )",com.google.common.collect;version="[16.0,17)",com.google.common.io;v
 ersion="[16.0,17)",javax.ws.rs;version="[2.0,3)",org.apache.cxf.jaxrs.e
 xt;version="[3.1,4)",org.apache.cxf.jaxrs.ext.multipart;version="[3.1,4
 )",org.osgi.framework;version="[1.8,2)",org.osgi.service.blueprint;vers
 ion="[1.0.0,2.0.0)"

On Fri, Jul 24, 2015 at 9:34 AM, Benson Margulies <be...@basistech.com> wrote:
> It works *sometimes* and not others.
>
> In the debugger, I see that the annotations themselves are Proxy
> instances; I'm not sure if that's the source of the trouble.
>
> Here is the relevant subset of the manifest:
>
>
>
> On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>> Maybe your import is not correct. I guess that you correctly import the
>> annotation bundle (and not re-export it). Correct ?
>>
>> Regards
>> JB
>>
>>
>> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>>
>>> Boy did I just get confused.
>>>
>>> If you stop a bundle containing a CXF service, update it, and start
>>> it, CXF will, for some reason, no longer see the annotation classes,
>>> and will decide that the service bean has no useful methods.
>>>
>>> This is slightly annoying when debugging, but would be a big problem
>>> for live management.
>>>
>>> Is there something I might be doing wrong to provoke this?
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com

Re: Karaf, CXF, classloading, debugging

Posted by Benson Margulies <be...@basistech.com>.
It works *sometimes* and not others.

In the debugger, I see that the annotations themselves are Proxy
instances; I'm not sure if that's the source of the trouble.

Here is the relevant subset of the manifest:



On Fri, Jul 24, 2015 at 9:30 AM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> Maybe your import is not correct. I guess that you correctly import the
> annotation bundle (and not re-export it). Correct ?
>
> Regards
> JB
>
>
> On 07/24/2015 03:29 PM, Benson Margulies wrote:
>>
>> Boy did I just get confused.
>>
>> If you stop a bundle containing a CXF service, update it, and start
>> it, CXF will, for some reason, no longer see the annotation classes,
>> and will decide that the service bean has no useful methods.
>>
>> This is slightly annoying when debugging, but would be a big problem
>> for live management.
>>
>> Is there something I might be doing wrong to provoke this?
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Re: Karaf, CXF, classloading, debugging

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Maybe your import is not correct. I guess that you correctly import the 
annotation bundle (and not re-export it). Correct ?

Regards
JB

On 07/24/2015 03:29 PM, Benson Margulies wrote:
> Boy did I just get confused.
>
> If you stop a bundle containing a CXF service, update it, and start
> it, CXF will, for some reason, no longer see the annotation classes,
> and will decide that the service bean has no useful methods.
>
> This is slightly annoying when debugging, but would be a big problem
> for live management.
>
> Is there something I might be doing wrong to provoke this?
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com