Unable to resolve any beans for Types [org.glassfish.jersey.message.filtering.spi.ObjectProvider<com.fasterxml.jackson.databind.ser.FilterProvider>] Unable to resolve any beans for Types [org.glassfish.jersey.message.filtering.spi.ObjectProvider<com.fasterxml.jackson.databind.ser.FilterProvider>] json json

Unable to resolve any beans for Types [org.glassfish.jersey.message.filtering.spi.ObjectProvider<com.fasterxml.jackson.databind.ser.FilterProvider>]


The problem seems to be occurring in the FilteringJacksonJaxbJsonProvider, which is Jersey own Jackson provider, for it's support for it Entity Data Filtering. Seems there is some injection (invoking Weld) going on that causes it to fail. If you don't need the entity data filtering feature, you could get rid of the jersey-media-json-jackson and instead use

<dependency>  <groupId>com.fasterxml.jackson.jaxrs</groupId>  <artifactId>jackson-jaxrs-json-provider</artifactId>  <version>${jackson2.version}</version></dependency>// as of now ${jackson2.version} == 2.5.3

As for the Weld problem, I am not sure if it will cause a problem for you in the future, so I would not consider changing the Jackson dependency being a solution, rather a work-around.

You said in your comments you are using gf-cdi. Maybe that is the problem. That artifact is no longer produced after Jersey 2.14 (you're using Jersey 2.17). The CDI support module has changed. You can see 27.3.1. Release 2.15 Highlights. It mentions some things about the CDI support dependencies.

CDI support improvement caused breaking changes for those users directly referring to the following CDI supporting Jersey module in maven:

<dependency>     <groupId>org.glassfish.jersey.containers.glassfish</groupId>     <artifactId>jersey-gf-cdi</artifactId>     <version>${pre-2.15-version}</version> </dependency>

The above dependency needs to be replaced with:

<dependency>     <groupId>org.glassfish.jersey.ext.cdi</groupId>     <artifactId>jersey-cdi1x</artifactId>     <version>2.17</version></dependency>

The following needs to be included in addition if you want to leverage CDI JTA support:

<dependency>     <groupId>org.glassfish.jersey.ext.cdi</groupId>     <artifactId>jersey-cdi1x-transaction</artifactId>     <version>2.17</version></dependency>


I was able to solve this by simply putting "Accept: application/xml" in the request. I also used @Consumes annotation as shown in the screenshot. enter image description here

enter image description here