users@jersey.java.net

[Jersey] Re: Using Jackson 2.1 JSON provider: No root resource classes

From: Kaan Özdökmeci <kaan_at_ozdokmeci.com>
Date: Fri, 22 Mar 2013 08:33:12 +0200

I'm using jackson 2.1 with jersey 1.17 wihout any problems

Kaan Ozdokmeci

On 21 Mar 2013, at 11:22, Marko Asplund <marko.asplund_at_gmail.com> wrote:

> Hi,
>
> I'm trying to use Jackson 2.1 as the JSON provider for Jersey 1.17 but
> get this error when making a request to the resource:
>
> INFO: Instantiated the Application class com.foo.bar.MyApplication
> Mar 21, 2013 10:57:00 AM
> com.sun.jersey.server.impl.application.RootResourceUriRules <init>
> SEVERE: The ResourceConfig instance does not contain any root resource classes.
>
> Is Jackson 2.1 known to be compatible with and work with Jersey 1.17?
>
> I've applied instructions found from:
> http://wiki.fasterxml.com/JacksonFAQ#JAX-RS
>
> And created my custom Application class and configured that in web.xml
> like this:
>
> <init-param>
> <param-name>javax.ws.rs.Application</param-name>
> <param-value>com.foo.bar.MyApplication</param-value>
> </init-param>
>
> I've also tried setting com.sun.jersey.config.property.packages init param.
>
> Is there something else that needs to be done in order to configure a
> custom JSON provider?
>
> marko