tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From César Hernández Mendoza <cesargu...@gmail.com>
Subject Re: CXF default exception mapper config
Date Mon, 24 Jun 2019 22:07:51 GMT
I haven't implemented your scenario yet but it seems it's related with the
configuration on the openejb-jar.xml file [1]:


In the openejb-jar.xml put

> <openejb-jar xmlns="openejb.org/openejb-jar/1.1">
>  <pojo-deployment class-name="jaxrs-application">
>    <properties>
>           cxf.jaxrs.providers = namespace.YourCustomExceptionMapper
>    </properties>
>  </pojo-deployment>
> </openejb-jar>



[1]
https://stackoverflow.com/questions/34234609/how-can-i-enable-my-custom-exceptionmapper-in-tomee





El mié., 19 jun. 2019 a las 7:29, Felipe Jaekel (<fkjaekel@gmail.com>)
escribió:

> Hi,
>
> I'm working in a REST service that throws WebApplicationExcepion with
> custom messages. I need pass the custom exception message to the client,
> but it is ignored. After some search, I found that
> the WebApplicationExceptionMapper was the responsible for ignoring the
> exception message, but it has a parameter addMessageToResponse. Setting it
> to true while debugging on Eclipse works as expected. So my question is how
> do I set this parameter on TomEE config? The CXF documentation shows how to
> do it using Spring, but I'm using pure Java EE.
>
>
> https://cxf.apache.org/docs/jax-rs-basics.html#JAX-RSBasics-CustomizingdefaultWebApplicationExceptionmapper
>
> Thanks
>


-- 
Atentamente:
César Hernández.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message