title: Warning with Tomcat 8 and Glassfish Metro
body: <p>I am using Metro 2.3.1-b104 with Tomcat 7.0.28 and all works without an issue. However, when switching to Tomcat 8.0.3 I get the following warning on every web service call (even though they still work). I see the following warning:</p>
  
  <pre><code>WARNING: onComplete() failed for listener of type 
  
  [org.apache.catalina.core.AsyncListenerWrapper]
  java.lang.IllegalStateException: It is illegal to call getRequest() after complete() or any of the dispatch() methods has been called
      at org.apache.catalina.core.AsyncContextImpl.getRequest(AsyncContextImpl.java:213)
      at com.sun.xml.ws.transport.http.servlet.WSAsyncListener$1.onComplete(WSAsyncListener.java:69)
      at org.apache.catalina.core.AsyncListenerWrapper.fireOnComplete(AsyncListenerWrapper.java:35)
      at org.apache.catalina.core.AsyncContextImpl.fireOnComplete(AsyncContextImpl.java:100)
      at org.apache.coyote.AsyncStateMachine.asyncPostProcess(AsyncStateMachine.java:206)
      at org.apache.coyote.AbstractProcessor.asyncPostProcess(AbstractProcessor.java:136)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:656)
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1575)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1533)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
  </code></pre>
  
  <p>Any suggestions on:</p>
  
  <ol>
  <li>Is it a Tomcat or Metro ?</li>
  <li>What is the underlying cause ?</li>
  <li>How to fix ?</li>
  </ol>