I note that you’re using the Component Property annotations for the extension, but a raw property entry for the resource. If your build plugin is able to cope with Component Property annotations then you can use the @JaxrsResource annotation instead of a magic string. If your build plugin can’t process Component Property annotations then you will need to use the String form in both services.
Tim Sent from my iPhone > On 2 Apr 2019, at 14:29, xav <xaviermillie...@eaton.com> wrote: > > Hi tim, > > I use JAXRS resource > My RestExceptionMapper is coded like this > > @JaxrsExtension > @Component(service = RestExceptionMapper.class, name = > "RestExceptionMapper", immediate = true) > public class RestExceptionMapper implements > ExceptionMapper<RestCommonException> > > ........ > > My ressources > > @Component( > property = { "osgi.jaxrs.resource=true" }, > service = SayHelloRestService.class, name = "SayHello", immediate = > true) > @Path("/sayhello") > public class SayHelloRestService { > > > @GET > @Path("{name}") > @Produces(MediaType.APPLICATION_JSON) > public String sayHello(@PathParam("name") final String name) throws > RestCommonException { > Name namee = new Name (helloService.sayHello(name)); > throw new RestCommonException("pouet"); > } > > And it's the same thing!!! > > Thx for your help > > > > > -- > Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html