tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From netname <>
Subject TomEE 1.5 and Jackson
Date Thu, 04 Oct 2012 06:28:44 GMT
I am trying to move a JAX-RS application from 1.0 to 1.5 but I am getting all
sort of errors. The first error I got was: "No message body writer has been
found for response class". So I came to the forum and read that setting the
providers in and putting the Jackson jars in TomEE/lib is
not the appropiate way anymore. Below are the steps that I am following,
please let me know where is my error:

Setup Jackson in TomEE 1.5

1)  Copy jackson-mapper-asl-1.9.9.jar, jackson-core-asl-1.9.9.jar,
jackson-jaxrs-1.9.9.jar in MyWebApp/lib folder

2) Under the WEB-INF folder add the following files:

    <Service id="jsonProvider"
             class-name="org.codehaus.jackson.jaxrs.JacksonJsonProvider" />
    <Service id="jaxbProvider"

<openejb-jar xmlns="">
            cxf.jax-rs.providers = jsonProvider, jaxbProvider


*1) Which namespace for openejb-jar-1.1 should I use?*
    I found that newer versions do not support the pojo-deployment element

*2) Which is the use of the class specified in the pojo-deployment?*
  In TomEE I did not have to implement a Provider class. I did do it,
though, in order to customize the date format on the generated JSON. I am
not sure if this is the class that should be used for the pojo-deployment

The class that I am using as Provider is:

public class JacksonContextResolver implements ContextResolver<ObjectMapper>
    private ObjectMapper objectMapper;

    public JacksonContextResolver() throws Exception {
        this.objectMapper = new
    public ObjectMapper getContext(Class<?> objectType) {
        return objectMapper;



View this message in context:
Sent from the OpenEJB User mailing list archive at

View raw message