tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From netname <>
Subject Re: TomEE 1.5 and Jackson
Date Thu, 04 Oct 2012 22:57:18 GMT
Thanks a lot Romain !  With your post and an example I found that you wrote a
while ago (foo) I was able to make it work.  The only issue that I have is
that if my service is an EJB I get the following error: *"number of beans
deployed (11) does not match the number of beans actually in the jar (12)"*.
I have other EJBs that are not endpoints in JAX-RS. It seems that once I
define an EJB in openejb-jar.xml I have to define them all in

I am attaching the Foo project modified to register Jackson. 

The steps to setup Jackson in TomEE (as it is my understanding) are:

*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 into WEB-INF/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" 

    <pojo-deployment class-name="com.example.MyJaxRSService">
            cxf.jax-rs.providers = jsonProvider, jaxbProvider 

Note: make sure that MyJaxRSService is a POJO, if it were an EJB then you
should use ejb-deployment



1) Could someone please point me to instructions on how to register EJBs in
2) How can I avoid the error: "number of beans deployed (11) does not match
the number of beans actually in the jar (12)"

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

View raw message