maritimeconnectivity / MaritimeCloud

INACTIVE: A communication framework enabling efficient, secure, reliable and seamless electronic information exchange between maritime stakeholders across available communication systems.
http://dev.maritimecloud.net
Other
13 stars 10 forks source link

Issue with Tomcat and async writes #29

Open kaspernielsen opened 9 years ago

kaspernielsen commented 9 years ago

When I wanted to try Java EE version of a client I’m getting this error:

java.lang.IllegalStateException: The remote endpoint was in state [TEXT_FULL_WRITING] which is an invalid state for called method at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.checkState(WsRemoteEndpointImplBase.java:1092) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase$StateMachine.textStart(WsRemoteEndpointImplBase.java:1055) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendStringByCompletion(WsRemoteEndpointImplBase.java:205) at org.apache.tomcat.websocket.WsRemoteEndpointImplBase.sendStringByFuture(WsRemoteEndpointImplBase.java:193) at org.apache.tomcat.websocket.WsRemoteEndpointAsync.sendText(WsRemoteEndpointAsync.java:53) at net.maritimecloud.internal.mms.client.connection.transport.ClientTransportJsr356.sendMessage(ClientTransportJsr356.java:177) at net.maritimecloud.internal.mms.client.connection.session.SessionSender$Writer.run(SessionSender.java:216) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

shortly after connection is made. The set-up is Java 8 and Tomcat 8.0.15 which has a native WS support. With common non-ee version it’s working so far.

kaspernielsen commented 9 years ago

Thanks for reporting this. It will probably take some time to fix.

There are some issues with how concurrent writes are handled between Jetty and Tomcat. https://bz.apache.org/bugzilla/show_bug.cgi?id=56026