Ureport opens the report files Error: baseMapper [How to Solve]

Initial exception

org.springframework.http.converter.HttpMessageNotWritableException: No converter for [class com.cdw.common.core.model.Resp] with preset Content-Type 'text/json;charset=UTF-8'

Solution:

Set ↓

resp.setContentType("text/json");

Change to ↓

resp.setContentType("application/json");

Then another exception occurs


java.lang.IllegalStateException: getOutputStream() has already been called for this response

Solution:

Set ↓

this.writeObjectToJson(resp, this.reportProviders);

Change to ↓

this.writeObjectToJson(resp, JSONObject.toJSON(this.reportProviders));

Full screenshot after modification:

Read More: