Java Code Examples for com.fasterxml.jackson.core.JsonProcessingException.getOriginalMessage()

The following are Jave code examples for showing how to use getOriginalMessage() of the com.fasterxml.jackson.core.JsonProcessingException class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: OpenLRW   File:   Source Code and License Vote up 6 votes
@ResponseStatus(value = HttpStatus.BAD_REQUEST)
public XAPIErrorInfo handleHttpMessageNotReadableException(final HttpServletRequest request, HttpMessageNotReadableException e) {
    if (e.getCause() instanceof UnrecognizedPropertyException) {
        return this.handleUnrecognizedPropertyException(request, (UnrecognizedPropertyException)e.getCause());
    } else {
        XAPIErrorInfo result;
        if (e.getCause() instanceof JsonProcessingException) {
            final JsonProcessingException jpe = (JsonProcessingException)e.getCause();
            result = new XAPIErrorInfo(HttpStatus.BAD_REQUEST, request, jpe.getOriginalMessage());
        } else {
            result = new XAPIErrorInfo(HttpStatus.BAD_REQUEST, request, e);
        return result;
Example 2
Project: holon-json   File:   Source Code and License Vote up 5 votes
 * Read a {@link PropertyBox} from JSON content, using current {@link com.holonplatform.core.Context} property set.
 * @param reader Reader
 * @return The deserialized {@link PropertyBox} instance
 * @throws IOException IO read error
 * @throws WebApplicationException JSON processing exception
private PropertyBox readPropertyBox(Reader reader) throws IOException {
	try {
		return getObjectReader().readValue(reader);
	} catch (JsonProcessingException e) {
		throw new WebApplicationException(e.getOriginalMessage(), Response.status(Status.BAD_REQUEST)