Example usage for org.springframework.http.converter HttpMessageNotWritableException printStackTrace

List of usage examples for org.springframework.http.converter HttpMessageNotWritableException printStackTrace

Introduction

In this page you can find the example usage for org.springframework.http.converter HttpMessageNotWritableException printStackTrace.

Prototype

public void printStackTrace() 

Source Link

Document

Prints this throwable and its backtrace to the standard error stream.

Usage

From source file:com.dbsvg.controllers.JsonView.java

public ModelAndView Render(Object model, HttpServletResponse response) {

    MediaType jsonMimeType = MediaType.APPLICATION_JSON;

    try {//from ww w  .  j a v a 2  s  .  c  o  m
        jsonConverter.write(model, jsonMimeType, new ServletServerHttpResponse(response));
    } catch (HttpMessageNotWritableException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }

    return null;
}