title: Why is HttpServletRequest inputstream empty?
body: <p>I have this code where I read the input from a request input stream and use a JacksonMapper to convert into a POJO. Its running in a jetty 7 container with guice support.</p>
  
  <pre><code>@Override
  protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  
      try {
          RequestType requestType = mapper.readValue(req.getInputStream(), RequestType.class);
      } Catch(Exception ex) {
          ....
      }
  }
  </code></pre>
  
  <p>However, sometimes under load the following exception is thrown. I have checked my client and I am sure its sending a valid json string. What is going wrong? Is it expected behavior for Jetty 7 under load?</p>
  
  <pre><code>java.io.EOFException: No content to map to Object due to end of input
      at org.codehaus.jackson.map.ObjectMapper._initForReading(ObjectMapper.java:2433)
      at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2385)
      at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1637)
      at com.ea.wsop.user.LoginServlet.processRequest(LoginServlet.java:69)
      at com.ea.wsop.user.LoginServlet.doPost(LoginServlet.java:63)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd.CGLIB$doPost$0(&lt;generated&gt;)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd$$FastClassByGuice$$c6f479ee.invoke(&lt;generated&gt;)
      at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
      at com.ea.monitor.MethodExecutionTimer.invoke(MethodExecutionTimer.java:130)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
      at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd.doPost(&lt;generated&gt;)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd.CGLIB$service$8(&lt;generated&gt;)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd$$FastClassByGuice$$c6f479ee.invoke(&lt;generated&gt;)
      at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
      at com.ea.monitor.MethodExecutionTimer.invoke(MethodExecutionTimer.java:130)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
      at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd.service(&lt;generated&gt;)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd.CGLIB$service$9(&lt;generated&gt;)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd$$FastClassByGuice$$c6f479ee.invoke(&lt;generated&gt;)
      at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
      at com.ea.monitor.MethodExecutionTimer.invoke(MethodExecutionTimer.java:130)
      at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
      at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
      at com.ea.wsop.user.LoginServlet$$EnhancerByGuice$$a91c2ebd.service(&lt;generated&gt;)
      at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
  </code></pre>