karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav <xaviermillie...@eaton.com>
Subject Re: ExceptionMapper on Aries JAX-RS Whiteboard on karaf 4.2.3 and above.
Date Tue, 02 Apr 2019 13:29:37 GMT
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

Mime
View raw message