How to solve could not find writer for content-type application/json type

In this short tutorial we will learn how to fix a common error that you can hit when deploying REST Web service that produce or consume JSON content type.

Error description:

RESTEASY004655: Unable to invoke request: RESTEASY003215: could not find writer for content-type application/json type: 

A common cause of this issue is that you are either:

  • Missing a JSON Provider such as Jackson2. Jackson is is a multi-purpose Java library for processing JSON data format.
  • An incorrect version of Resteasy Client

Example of the correct dependencies for a RESTeasy Endpoint that produces/consumes JSON Media type:




Sample JAX-RS Application that consumes/produces JSON media type

Here is a minimal REST Endpoint you can use as an example:

public class ParamRESTService {

	@Inject DataList ejb;

	public SimpleProperty getPropertyById(@PathParam("id")int id)
		return ejb.getList().get(id);

	public List<SimpleProperty> getProperty()
		return ejb.getList();

	public Response createProperty(  SimpleProperty p) {
		int n = ejb.addToList(p);
		return Response.status(Response.Status.OK).build();

The DataList is an EJB that stores an ArrayList of a Java POJO in memory:

public class DataList implements Serializable {
	private List<SimpleProperty> list;

	public void init() {
		list = new ArrayList<SimpleProperty>();

	public List<SimpleProperty> getList() {
		return list;

	public void setList(List list) {
		this.list = list;
	public int addToList(String key, String value) {

		list.add(new SimpleProperty(key,value));
		return list.size();
	public int addToList(SimpleProperty p) {
		return list.size();


Testing the REST Service

In order to Test the REST Service you can use the following JUnit Test Class:

public class TestClient {
String BASE_URL ="http://localhost:8080/ee-rest-client/rest";

	public void testParam() {
		Client client = ClientBuilder.newClient();
		SimpleProperty p1 = new SimpleProperty("mykey","value");

		WebTarget myResource ="/service");
		Response rs = myResource.request(MediaType.APPLICATION_JSON)
						.post(Entity.json(p1), Response.class);


		SimpleProperty property ="/service/{key}")
				        .resolveTemplate("key", "0")

        List<SimpleProperty> result ="/service")
            .request(MediaType.APPLICATION_JSON).get(new GenericType<List<SimpleProperty>>() {





This article was a quick howto to help you with the error “RESTEASY003215: could not find writer for content-type application/json type:”.