rest - A message body writer for Java class java.util.ArrayList, and Java type class java.util.ArrayList, and MIME media type application/json was not found -
i new using jersy implementing rest api i below error, when call products service. com.sun.jersey.api.messageexception: message body writer java class java.util.arraylist, , java type class java.util.arraylist, , mime media type application/json not found. here code: @get @path("/products") @produces(mediatype.application_json) public response productsearch(@queryparam("name") string name) { list<product> products = new arraylist<>(); products.add(new product("prdname", "prdcost", "prdmodel")); return response.ok( products).build(); } i tried this: @get @path("/products") @produces(mediatype.application_json) public list<product> productsearch(@queryparam("name") string name) { list<product> products = new arraylist<>(); products.add(new product("prdname", "prdcost", "prdmodel")); return products; } the below setup of env...