java – Initialization failure on JAXRS Jersey SpringBoot REST API

A simple image upload controller consuming multipart/form-data fails to initialize. The controller code @POST @Path(“/image”) @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) public Response uploadImage( @FormDataParam(“image”) InputStream fileInputStream ) throws Exception{ BufferedImage image =; System.out.println(“uploaded image”); return Response.ok(“done”).build(); } Error happens during the first request when Jersey is initializing the controller. org.glassfish.jersey.server.model.ModelValidationException: Validation of the application resource model … Read more