title: Server: [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.service Error processing request java.lang.NullPointerException
body: <p>My tomcat server always throws the following the errors(in the linux,Tomcat version is 8.5.4, using tail -f catalina.out):</p>
  
  <p>The first error:</p>
  
  <pre><code>17-Jan-2017 10:39:24.982 SEVERE [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.service Error processing request
   java.lang.NullPointerException
      at org.apache.catalina.connector.Request.parseCookies(Request.java:3047)
      at org.apache.catalina.connector.Request.getServerCookies(Request.java:2098)
      at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:1007)
      at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:707)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
  
  17-Jan-2017 10:39:24.983 SEVERE [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.endRequest Error finishing response
   java.lang.NullPointerException
  </code></pre>
  
  <p>The second error:</p>
  
  <pre><code>17-Jan-2017 11:08:33.696 SEVERE [http-nio-8080-exec-8] org.apache.coyote.http11.Http11Processor.endRequest Error finishing response
   java.lang.NullPointerException
  
  17-Jan-2017 11:08:33.743 SEVERE [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.service Error processing request
   java.lang.NullPointerException
  
  17-Jan-2017 11:08:33.743 SEVERE [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.endRequest Error finishing response
   java.lang.NullPointerException
  
  17-Jan-2017 11:08:33.838 SEVERE [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.service Error processing request
   java.lang.NullPointerException
  
  17-Jan-2017 11:08:33.838 SEVERE [http-nio-8080-exec-7] org.apache.coyote.http11.Http11Processor.endRequest Error finishing response
   java.lang.NullPointerException
  </code></pre>
  
  <p>The third error:</p>
  
  <pre><code>17-Jan-2017 11:20:52.232 SEVERE [http-nio-8080-exec-3] org.apache.coyote.http11.Http11Processor.service Error processing request
   java.lang.NullPointerException
      at org.apache.tomcat.util.buf.MessageBytes.toChars(MessageBytes.java:257)
      at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:641)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
      at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
      at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
      at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
      at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)
  </code></pre>
  
  <p>The front end html always print the errors:</p>
  
  <pre><code>Failed to load resource: the server responded with a status of 502 (Bad Gateway)
  </code></pre>
  
  <p>Backend server mainly use Spring, Jersey and the front end uses H5, AngularJS. Any idea, i will appreciate!</p>