Bug #1066

SimpleChat Example gets Exceptions in Jetty and JBoss

Added by David Hubbard about 11 years ago. Updated over 10 years ago.

Pieter Libin
Target version:
Start date:
Due date:
% Done:


Estimated time:


Running the latest git (cloned 21/11) with Eclipse and Jetty plus also JBoss AS7

SimpleChat With Jetty:

With a number of guest sessions active (2 on Chrome and 1 on IE 8) I see "org.mortbay.jetty.EofException" messages. This happens every time when sending with IE and occasionally with Chrome. See below for Exception detail. This doesn't affect the application behaviour on Jetty - but it does with JBoss (which is what I was hoping to target) here I get dialog errors and sessions stop.

So I'm providing the Jetty stuff for tracing as they may be related.

With JBoss:

I see "ERROR [stderr] (http--- Exception occurred when flushing the writer" message on the server.

In Chrome I see "Wt internal error: TypeError: Cannot call method 'setAttribute' of undefined, code: undefined, description:


In IE I see "Wt internal error:[object Error], code: undefined, description; Could not complete the operation due to error 80020101."

And as above chat sessions become unusable thereafter.

Exception on Jetty


at org.mortbay.jetty.HttpGenerator.flush(

at org.mortbay.jetty.AbstractGenerator$Output.flush(

at org.mortbay.jetty.HttpConnection$Output.flush(

at sun.nio.cs.StreamEncoder.implFlush(Unknown Source)

at sun.nio.cs.StreamEncoder.flush(Unknown Source)

at Source)

at eu.webtoolkit.jwt.servlet.WebResponse.flush(

at eu.webtoolkit.jwt.WebSession.serveResponse(

at eu.webtoolkit.jwt.WebSession.render(

at eu.webtoolkit.jwt.WebSession.notify(

at eu.webtoolkit.jwt.WApplication.notify(

at eu.webtoolkit.jwt.WebSession.handleRequest(

at eu.webtoolkit.jwt.WtServlet.doHandleRequest(

at eu.webtoolkit.jwt.ServletApi.handleRequest(

at eu.webtoolkit.jwt.ServletApi25.doHandleRequest(

at eu.webtoolkit.jwt.WtServlet.handleRequest(

at eu.webtoolkit.jwt.WtServlet.doPost(

at javax.servlet.http.HttpServlet.service(

at javax.servlet.http.HttpServlet.service(

at org.mortbay.jetty.servlet.ServletHolder.handle(

at org.mortbay.jetty.servlet.ServletHandler.handle(


at org.mortbay.jetty.servlet.SessionHandler.handle(

at org.mortbay.jetty.handler.ContextHandler.handle(

at org.mortbay.jetty.webapp.WebAppContext.handle(

at org.mortbay.jetty.handler.HandlerWrapper.handle(

at org.mortbay.jetty.Server.handle(

at org.mortbay.jetty.HttpConnection.handleRequest(

at org.mortbay.jetty.HttpConnection$RequestHandler.content(

at org.mortbay.jetty.HttpParser.parseNext(

at org.mortbay.jetty.HttpParser.parseAvailable(

at org.mortbay.jetty.HttpConnection.handle(


at org.mortbay.thread.QueuedThreadPool$

Caused by: An existing connection was forcibly closed by the remote host

at Method)

at Source)

at Source)

at Source)

at java.nio.channels.SocketChannel.write(Unknown Source)



at org.mortbay.jetty.HttpGenerator.flush(

... 33 more


1066_JBoss_SimpleChat_IE_Exception.txt (5.53 KB) 1066_JBoss_SimpleChat_IE_Exception.txt JBoss Exception with IE David Hubbard, 11/23/2011 07:57 PM
1066_Jetty_SimpleChat_IE_Exception.txt (2.96 KB) 1066_Jetty_SimpleChat_IE_Exception.txt Jetty Exception with IE David Hubbard, 11/23/2011 07:57 PM

Updated by David Hubbard about 11 years ago

I notice that the JBoss part of this may be a duplicate of #634

Is there anyway of specifying in the code which Servlet Spec to use so that it can still run in JBoss AS 7 ?



Updated by Pieter Libin about 11 years ago

  • Status changed from New to Resolved
  • Assignee set to Pieter Libin


this indeed seems to be a duplicate of issue #634.

You should be able to get the example working on JBoss by disabling the asynchronous io.

You can do this in WebRoot/WEB-INF/web.xml, by changing the async-supported xml element's value to false.




Updated by David Hubbard about 11 years ago


Thanks, I've applied the "false" setting - Operation in JBoss behaves as Jetty now - application works.

However on both App Servers: Chrome actions are all clean on the server, but all IE actions, whether they are login, send, logout click (before confirm) and confirm buttons generate an Exception on the server

I attach output of these exceptions, which look broadly equivalent to me.

Not sure this is a show stopper, but a little concerned from a support perspective by amount of log activity on server this would generate - with potential to hide other more serious errors in the noise.




Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to InProgress

Hey Dave,

This exception is actually harmless and should be caught and reported as a warning.

To be fixed.




Updated by Pieter Libin almost 11 years ago

  • Target version set to 3.2.2

Updated by Koen Deforche over 10 years ago

  • Status changed from InProgress to Resolved

Updated by Koen Deforche over 10 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF