Package org.springframework.http.converter

Examples of org.springframework.http.converter.HttpMessageNotWritableException


    try {
      Writer writer = new OutputStreamWriter(outputMessage.getBody(), wireFeedEncoding);
      feedOutput.output(wireFeed, writer);
    }
    catch (FeedException ex) {
      throw new HttpMessageNotWritableException("Could not write WiredFeed: " + ex.getMessage(), ex);
    }
  }
View Full Code Here


        jsonGenerator.writeRaw("{} && ");
      }
      this.objectMapper.writeValue(jsonGenerator, object);
    }
    catch (JsonProcessingException ex) {
      throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

  protected void writeToResult(T t, HttpHeaders headers, Result result) throws IOException {
    try {
      transform(t, result);
    }
    catch (TransformerException ex) {
      throw new HttpMessageNotWritableException("Could not transform [" + t + "] to [" + result + "]", ex);
    }
  }
View Full Code Here

    Assert.notNull(this.marshaller, "Property 'marshaller' is required");
    try {
      this.marshaller.marshal(o, result);
    }
    catch (MarshallingFailureException ex) {
      throw new HttpMessageNotWritableException("Could not write [" + o + "]", ex);
    }
  }
View Full Code Here

        jsonGenerator.writeRaw("{} && ");
      }
      this.objectMapper.writeValue(jsonGenerator, object);
    }
    catch (JsonProcessingException ex) {
      throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

        jsonGenerator.writeRaw("{} && ");
      }
      this.objectMapper.writeValue(jsonGenerator, object);
    }
    catch (JsonProcessingException ex) {
      throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

    I convertedAccessToken = convertToInternal(accessToken);
    try {
      createMarshaller().marshal(convertedAccessToken, result);
    }
    catch (MarshalException ex) {
      throw new HttpMessageNotWritableException("Could not marshal [" + accessToken + "]: " + ex.getMessage(), ex);
    }
    catch (JAXBException ex) {
      throw new HttpMessageConversionException("Could not instantiate JAXBContext: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

      if (isPrettyPrint()) {
        jsonGenerator.useDefaultPrettyPrinter();
      }
      getObjectMapper().writeValue(jsonGenerator, o);
    } catch (JsonGenerationException ex) {
      throw new HttpMessageNotWritableException("Could not write JSON: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

    try {
      Writer writer = new OutputStreamWriter(outputMessage.getBody(), wireFeedEncoding);
      feedOutput.output(wireFeed, writer);
    }
    catch (FeedException ex) {
      throw new HttpMessageNotWritableException("Could not write WireFeed: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

      writeSuffix(generator, object);
      generator.flush();

    }
    catch (JsonProcessingException ex) {
      throw new HttpMessageNotWritableException("Could not write content: " + ex.getMessage(), ex);
    }
  }
View Full Code Here

TOP

Related Classes of org.springframework.http.converter.HttpMessageNotWritableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.