title: Unexpected character ('<' (code 60))
body: <p>I'm getting a weird error.  This used to work.  I'm not sure if it is app server, code, jvm?</p>
  
  <pre><code>JVM: Java Virtual Machine initialized.
  Java runtime version: pwa6480sr4fp5-20170421_01 (SR4 FP5)
  JVM version: JRE 1.8.0 Windows Server 2008 R2 amd64-64 20170419_344392 (JIT enabled, AOT enabled) J9VM - R28_20170419_1004_B344392 JIT  - tr.r14.java_20170419_344392 GC   - R28_20170419_1004_B344392 J9CL - 20170419
  </code></pre>
  
  <p>```</p>
  
  <pre><code>JVM: Caused by: 
  JVM: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('&lt;' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')
  JVM:  at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@2a19861e; line: 1, column: 2]
  JVM:  at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1524)
  JVM:  at com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:557)
  JVM:  at com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:475)
  JVM:  at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._handleUnexpectedValue(UTF8StreamJsonParser.java:2343)
  JVM:  at com.fasterxml.jackson.core.json.UTF8StreamJsonParser._nextTokenNotInObject(UTF8StreamJsonParser.java:818)
  JVM:  at com.fasterxml.jackson.core.json.UTF8StreamJsonParser.nextToken(UTF8StreamJsonParser.java:698)
  JVM:  at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3031)
  JVM:  at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:2978)
  JVM:  at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2158)
  JVM:  at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.readJavaType(MappingJackson2HttpMessageConverter.java:225)
  ```
  
  
  ```
  import org.springframework.web.client.RestTemplate;
  
  public static RestTemplate getRestTemplate() {
          RestTemplate restTemplate = new RestTemplate();
          List&lt;HttpMessageConverter&lt;?&gt;&gt; messageConverters = new ArrayList&lt;HttpMessageConverter&lt;?&gt;&gt;();
          MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
          List&lt;MediaType&gt; mediaTypes = new ArrayList&lt;MediaType&gt;();
          mediaTypes.add(MediaType.TEXT_HTML);
          mediaTypes.add(MediaType.APPLICATION_JSON);
          converter.setSupportedMediaTypes(mediaTypes);
          messageConverters.add(converter);
          messageConverters.add(new StringHttpMessageConverter());
          restTemplate.setMessageConverters(messageConverters);
          return restTemplate;
      }
  
  //The call is here
  ResponseEntity&lt;BargeType[]&gt; responseEntity = getRestTemplate().getForEntity(url+"/bargetype", BargeType[].class);
  
  ```
  </code></pre>
  
  <p>I checked the URL being passed in with my browser and I am getting back JSON.  I copy and pasted the response into json lint and validated it successfully.</p>
  
  <p>I'm guessing there is an error returned because the error messsage has '&lt;' in the exception.</p>
  
  <p>My questions are:</p>
  
  <p>1) Is there a better pattern to use RestTemplate?</p>
  
  <p>2) Is there a way to get the http error?</p>
  
  <p>Updated 5/3/2018 Using Fiddler Daisy recommended, the GET Response Header using Browser on my workstation (however, app is running on server).</p>
  
  <pre><code>HTTP/1.1 200 OK
  Server: Lotus-Domino
  Date: Thu, 03 May 2018 15:28:23 GMT
  Connection: close
  Content-Type: text/html; charset=UTF-8
  
  [{"contract":xxxx,"customer":".....
  </code></pre>