13 Replies Latest reply on Jun 17, 2014 1:38 AM by Michel Werren

    How ready are Websockets?

    Michel Werren Novice

      Hello together

       

      I try to switch from Coment to websockets. We use the JBoss EAP 6.1.Final (APR installed) and Errai 2.2.0.Final at the moment (migration to 3 is scheduled)

       

      Unfortunately i found some problems. The JBossAS7WebSocketServlet imports not existing frame classes (for me a local build from Errai sources has also failed because those imports). As workaround i tried to copy the whole class code into a own servlet and fix those imports.

       

      When i now try to switch the web.xml configuration to websockets like mentioned in the documentation (except i use my own websocket servlet instead), it results in a strange behavior. From time to time i have to reload the page more than one time to see the entire view. But in the Firefox console or in dev mode no error / exception appears, the websocket connection seems also to be successful established. Also in the server log i see only the entries about the websocket protokol and extension. The very confusing thing comes know. In our application the first view is a login mask. The login RPC execution seems to work. For the next view a list of Dto's has to be loaded via a further RPC and here the queue session id locks like lost.

       

      Here is the stack trace:

       

      09:51:50,636 DEBUG [org.apache.catalina.core] (http-/0.0.0.0:8080-3) JBWEB001119: Client abort exception: JBWEB002011: Socket read failed

      09:51:50,637 DEBUG [org.apache.catalina.core] (http-/0.0.0.0:8080-3) JBWEB001119: Client abort exception: JBWEB002011: Socket read failed

      09:51:52,635 INFO  [org.jboss.websockets.oio.internal.WebSocketHeaders] (http-/0.0.0.0:8080-3) found header field in request: Origin, with value:http://localhost:8080

      09:51:52,635 INFO  [org.jboss.websockets.oio.internal.WebSocketHeaders] (http-/0.0.0.0:8080-3) NOT found header field in request: Sec-WebSocket-Protocol, with value:null

      09:51:52,635 INFO  [org.jboss.websockets.oio.internal.WebSocketHeaders] (http-/0.0.0.0:8080-3) NOT found header field in request: Sec-WebSocket-Extensions, with value:null

      09:51:53,236 INFO  [org.jboss.errai.bus.server.MessageQueueImpl] (http-/0.0.0.0:8080-3) error writing to socket for queue 56eac7a895a98a1ba8ab85121c228e3ab6f8eec77d43947a2a83aeb1999356

      09:51:53,237 ERROR [stderr] (http-/0.0.0.0:8080-3) ClientAbortException:  java.io.IOException: JBWEB002012: Socket write failed

      09:51:53,237 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:403)

      09:51:53,237 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:450)

      09:51:53,237 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:295)

      09:51:53,238 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.OutputBuffer.writeByte(OutputBuffer.java:444)

      09:51:53,238 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:77)

      09:51:53,238 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.websockets.oio.internal.protocol.ietf13.Hybi13Socket._writeTextFrame(Hybi13Socket.java:178)

      09:51:53,238 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.websockets.oio.internal.protocol.ietf13.Hybi13Socket.writeFrame(Hybi13Socket.java:255)

      09:51:53,238 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.as.websockets.servlet.WebSocketDelegate.writeFrame(WebSocketDelegate.java:41)

      09:51:53,238 ERROR [stderr] (http-/0.0.0.0:8080-3)     at ch.apkern.achilles.app.server.websockets.AchillesWebSocketsServlet$SimpleEventChannelWrapped.write(AchillesWebSocketsServlet.java:78)

      09:51:53,238 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.MessageQueueImpl.offer(MessageQueueImpl.java:153)

      09:51:53,239 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.enqueueForDelivery(ServerMessageBusImpl.java:739)

      09:51:53,239 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:728)

      09:51:53,239 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:675)

      09:51:53,239 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.service.MessageBusProxy.send(MessageBusProxy.java:59)

      09:51:53,239 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.ConversationMessageWrapper.sendNowWith(ConversationMessageWrapper.java:228)

      09:51:53,239 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.DefaultMessageBuilder$1.sendNowWith(DefaultMessageBuilder.java:78)

      09:51:53,239 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:122)

      09:51:53,240 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)

      09:51:53,240 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:512)

      09:51:53,240 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.framework.DeliveryPlan.deliver(DeliveryPlan.java:43)

      09:51:53,240 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:632)

      09:51:53,240 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)

      09:51:53,240 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:93)

      09:51:53,240 ERROR [stderr] (http-/0.0.0.0:8080-3)     at ch.apkern.achilles.app.server.websockets.AchillesWebSocketsServlet.onReceivedFrame(AchillesWebSocketsServlet.java:186)

      09:51:53,241 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.as.websockets.servlet.WebSocketServlet.event(WebSocketServlet.java:166)

      09:51:53,241 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:458)

      09:51:53,241 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:364)

      09:51:53,241 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:409)

      09:51:53,241 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:171)

      09:51:53,241 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,241 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,242 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,242 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:247)

      09:51:53,242 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,242 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:121)

      09:51:53,242 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:228)

      09:51:53,242 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:767)

      09:51:53,242 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.event(Http11AprProtocol.java:565)

      09:51:53,243 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2030)

      09:51:53,243 ERROR [stderr] (http-/0.0.0.0:8080-3)     at java.lang.Thread.run(Thread.java:662)

      09:51:53,243 ERROR [stderr] (http-/0.0.0.0:8080-3) Caused by: java.io.IOException: JBWEB002012: Socket write failed

      09:51:53,243 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.InternalAprOutputBuffer.flushBuffer(InternalAprOutputBuffer.java:848)

      09:51:53,243 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.InternalAprOutputBuffer$SocketOutputBuffer.doWrite(InternalAprOutputBuffer.java:886)

      09:51:53,244 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.InternalAprOutputBuffer.doWrite(InternalAprOutputBuffer.java:546)

      09:51:53,244 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.Response.doWrite(Response.java:594)

      09:51:53,244 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:398)

      09:51:53,244 ERROR [stderr] (http-/0.0.0.0:8080-3)     ... 39 more

      09:51:53,262 ERROR [stderr] (http-/0.0.0.0:8080-3) org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint

      09:51:53,262 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:135)

      09:51:53,262 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)

      09:51:53,263 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:512)

      09:51:53,263 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.framework.DeliveryPlan.deliver(DeliveryPlan.java:43)

      09:51:53,263 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:632)

      09:51:53,263 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)

      09:51:53,263 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:93)

      09:51:53,263 ERROR [stderr] (http-/0.0.0.0:8080-3)     at ch.apkern.achilles.app.server.websockets.AchillesWebSocketsServlet.onReceivedFrame(AchillesWebSocketsServlet.java:186)

      09:51:53,263 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.as.websockets.servlet.WebSocketServlet.event(WebSocketServlet.java:166)

      09:51:53,264 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:458)

      09:51:53,264 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:364)

      09:51:53,264 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:409)

      09:51:53,264 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:171)

      09:51:53,264 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,264 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,264 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,265 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:247)

      09:51:53,265 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,265 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:121)

      09:51:53,265 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:228)

      09:51:53,265 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:767)

      09:51:53,265 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.event(Http11AprProtocol.java:565)

      09:51:53,265 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2030)

      09:51:53,265 ERROR [stderr] (http-/0.0.0.0:8080-3)     at java.lang.Thread.run(Thread.java:662)

      09:51:53,266 ERROR [stderr] (http-/0.0.0.0:8080-3) Caused by: org.jboss.errai.bus.server.QueueUnavailableException: no queue available to send. (queue or session may have expired): (session id: 56eac7a895a98a1ba8ab85121c228e3ab6f8eec77d43947a2a83aeb1999356)

      09:51:53,266 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.getQueueByMessage(ServerMessageBusImpl.java:1251)

      09:51:53,266 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:675)

      09:51:53,266 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.service.MessageBusProxy.send(MessageBusProxy.java:59)

      09:51:53,266 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.ConversationMessageWrapper.sendNowWith(ConversationMessageWrapper.java:228)

      09:51:53,267 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.DefaultMessageBuilder$1.sendNowWith(DefaultMessageBuilder.java:78)

      09:51:53,267 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:122)

      09:51:53,267 ERROR [stderr] (http-/0.0.0.0:8080-3)     ... 23 more

      09:51:53,267 ERROR [stderr] (http-/0.0.0.0:8080-3) *** Message delivery failure ***

      09:51:53,267 ERROR [stderr] (http-/0.0.0.0:8080-3) Bus: org.jboss.errai.bus.server.ServerMessageBusImpl@7d1ee2fc

      09:51:53,267 ERROR [stderr] (http-/0.0.0.0:8080-3) Message: CommandType=getUsers:, ErrorTo=ch.apkern.achilles.apiapplication.shared.generics.core.communication.UserRPC:RPC.getUsers::Errors:7, ReplyTo=ch.apkern.achilles.apiapplication.shared.generics.core.communication.UserRPC:RPC.getUsers::RespondTo:7, ToSubject=ch.apkern.achilles.apiapplication.shared.generics.core.communication.UserRPC:RPC, MethodParms=[]

      09:51:53,268 ERROR [stderr] (http-/0.0.0.0:8080-3) errorMessage: Error calling remote service: ch.apkern.achilles.apiapplication.shared.generics.core.communication.UserRPC:RPC

      09:51:53,268 ERROR [stderr] (http-/0.0.0.0:8080-3) exception: org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint

      09:51:53,268 ERROR [stderr] (http-/0.0.0.0:8080-3) disconnect: false

      09:51:53,268 ERROR [stderr] (http-/0.0.0.0:8080-3) org.jboss.errai.bus.server.QueueUnavailableException: no queue available to send. (queue or session may have expired): (session id: 56eac7a895a98a1ba8ab85121c228e3ab6f8eec77d43947a2a83aeb1999356)

      09:51:53,268 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.getQueueByMessage(ServerMessageBusImpl.java:1251)

      09:51:53,269 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:675)

      09:51:53,269 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.ConversationMessageWrapper.sendNowWith(ConversationMessageWrapper.java:228)

      09:51:53,269 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.DefaultMessageBuilder$1.sendNowWith(DefaultMessageBuilder.java:78)

      09:51:53,269 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.util.ErrorHelper.sendClientError(ErrorHelper.java:107)

      09:51:53,269 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.util.ErrorHelper.sendClientError(ErrorHelper.java:77)

      09:51:53,269 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.util.ErrorHelper.handleMessageDeliveryFailure(ErrorHelper.java:170)

      09:51:53,270 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:53)

      09:51:53,270 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:93)

      09:51:53,270 ERROR [stderr] (http-/0.0.0.0:8080-3)     at ch.apkern.achilles.app.server.websockets.AchillesWebSocketsServlet.onReceivedFrame(AchillesWebSocketsServlet.java:186)

      09:51:53,270 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.as.websockets.servlet.WebSocketServlet.event(WebSocketServlet.java:166)

      09:51:53,270 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:458)

      09:51:53,270 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:364)

      09:51:53,270 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:409)

      09:51:53,271 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:171)

      09:51:53,271 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,271 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,271 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,271 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:247)

      09:51:53,271 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,272 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:121)

      09:51:53,272 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:228)

      09:51:53,272 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:767)

      09:51:53,272 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.event(Http11AprProtocol.java:565)

      09:51:53,272 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2030)

      09:51:53,272 ERROR [stderr] (http-/0.0.0.0:8080-3)     at java.lang.Thread.run(Thread.java:662)

      09:51:53,285 ERROR [stderr] (http-/0.0.0.0:8080-3) org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint

      09:51:53,285 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:135)

      09:51:53,286 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.io.RemoteServiceCallback.callback(RemoteServiceCallback.java:54)

      09:51:53,286 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.cdi.server.CDIExtensionPoints$3.callback(CDIExtensionPoints.java:512)

      09:51:53,286 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.framework.DeliveryPlan.deliver(DeliveryPlan.java:43)

      09:51:53,286 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.sendGlobal(ServerMessageBusImpl.java:632)

      09:51:53,286 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:46)

      09:51:53,286 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:93)

      09:51:53,286 ERROR [stderr] (http-/0.0.0.0:8080-3)     at ch.apkern.achilles.app.server.websockets.AchillesWebSocketsServlet.onReceivedFrame(AchillesWebSocketsServlet.java:186)

      09:51:53,287 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.as.websockets.servlet.WebSocketServlet.event(WebSocketServlet.java:166)

      09:51:53,287 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:458)

      09:51:53,287 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:364)

      09:51:53,287 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:409)

      09:51:53,287 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:171)

      09:51:53,287 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,287 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,288 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,288 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:247)

      09:51:53,288 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,288 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:121)

      09:51:53,288 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:228)

      09:51:53,288 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:767)

      09:51:53,288 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.event(Http11AprProtocol.java:565)

      09:51:53,289 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2030)

      09:51:53,289 ERROR [stderr] (http-/0.0.0.0:8080-3)     at java.lang.Thread.run(Thread.java:662)

      09:51:53,289 ERROR [stderr] (http-/0.0.0.0:8080-3) Caused by: org.jboss.errai.bus.server.QueueUnavailableException: no queue available to send. (queue or session may have expired): (session id: 56eac7a895a98a1ba8ab85121c228e3ab6f8eec77d43947a2a83aeb1999356)

      09:51:53,289 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.getQueueByMessage(ServerMessageBusImpl.java:1251)

      09:51:53,289 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:675)

      09:51:53,289 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.service.MessageBusProxy.send(MessageBusProxy.java:59)

      09:51:53,290 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.ConversationMessageWrapper.sendNowWith(ConversationMessageWrapper.java:228)

      09:51:53,290 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.DefaultMessageBuilder$1.sendNowWith(DefaultMessageBuilder.java:78)

      09:51:53,290 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.io.ConversationalEndpointCallback.callback(ConversationalEndpointCallback.java:122)

      09:51:53,290 ERROR [stderr] (http-/0.0.0.0:8080-3)     ... 23 more

      09:51:53,290 ERROR [stderr] (http-/0.0.0.0:8080-3) *** Message delivery failure ***

      09:51:53,290 ERROR [stderr] (http-/0.0.0.0:8080-3) Bus: org.jboss.errai.bus.server.ServerMessageBusImpl@7d1ee2fc

      09:51:53,290 ERROR [stderr] (http-/0.0.0.0:8080-3) Message: CommandType=getSubstanceList:, ErrorTo=ch.apkern.achilles.apiapplication.shared.generics.laboratory.masterdata.communication.SubstanceRPC:RPC.getSubstanceList::Errors:8, ReplyTo=ch.apkern.achilles.apiapplication.shared.generics.laboratory.masterdata.communication.SubstanceRPC:RPC.getSubstanceList::RespondTo:8, ToSubject=ch.apkern.achilles.apiapplication.shared.generics.laboratory.masterdata.communication.SubstanceRPC:RPC, MethodParms=[]

      09:51:53,290 ERROR [stderr] (http-/0.0.0.0:8080-3) errorMessage: Error calling remote service: ch.apkern.achilles.apiapplication.shared.generics.laboratory.masterdata.communication.SubstanceRPC:RPC

      09:51:53,291 ERROR [stderr] (http-/0.0.0.0:8080-3) exception: org.jboss.errai.bus.client.api.base.MessageDeliveryFailure: error invoking endpoint

      09:51:53,291 ERROR [stderr] (http-/0.0.0.0:8080-3) disconnect: false

      09:51:53,291 ERROR [stderr] (http-/0.0.0.0:8080-3) org.jboss.errai.bus.server.QueueUnavailableException: no queue available to send. (queue or session may have expired): (session id: 56eac7a895a98a1ba8ab85121c228e3ab6f8eec77d43947a2a83aeb1999356)

      09:51:53,291 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.getQueueByMessage(ServerMessageBusImpl.java:1251)

      09:51:53,291 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.ServerMessageBusImpl.send(ServerMessageBusImpl.java:675)

      09:51:53,292 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.ConversationMessageWrapper.sendNowWith(ConversationMessageWrapper.java:228)

      09:51:53,292 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.api.base.DefaultMessageBuilder$1.sendNowWith(DefaultMessageBuilder.java:78)

      09:51:53,292 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.util.ErrorHelper.sendClientError(ErrorHelper.java:107)

      09:51:53,292 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.util.ErrorHelper.sendClientError(ErrorHelper.java:77)

      09:51:53,292 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.client.util.ErrorHelper.handleMessageDeliveryFailure(ErrorHelper.java:170)

      09:51:53,292 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.SimpleDispatcher.dispatchGlobal(SimpleDispatcher.java:53)

      09:51:53,292 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.errai.bus.server.service.ErraiServiceImpl.store(ErraiServiceImpl.java:93)

      09:51:53,293 ERROR [stderr] (http-/0.0.0.0:8080-3)     at ch.apkern.achilles.app.server.websockets.AchillesWebSocketsServlet.onReceivedFrame(AchillesWebSocketsServlet.java:186)

      09:51:53,293 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.jboss.as.websockets.servlet.WebSocketServlet.event(WebSocketServlet.java:166)

      09:51:53,293 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilterEvent(ApplicationFilterChain.java:458)

      09:51:53,293 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.ApplicationFilterChain.doFilterEvent(ApplicationFilterChain.java:364)

      09:51:53,293 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:409)

      09:51:53,293 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:171)

      09:51:53,293 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,294 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,294 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,294 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:247)

      09:51:53,294 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185)

      09:51:53,294 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:121)

      09:51:53,294 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:228)

      09:51:53,294 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProcessor.event(Http11AprProcessor.java:767)

      09:51:53,295 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.event(Http11AprProtocol.java:565)

      09:51:53,295 ERROR [stderr] (http-/0.0.0.0:8080-3)     at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2030)

      09:51:53,295 ERROR [stderr] (http-/0.0.0.0:8080-3)     at java.lang.Thread.run(Thread.java:662)

       

       

      Its very hard to determine the entire problem ... but i will continue trying

       

      Maybe anyone has a suggestion?

       

      Regards

      Michel

        • 1. Re: How ready are Websockets?
          Erik Jan de Wit Novice

          Hi Michel,

           

          The support for websockets is still experimental I think. Maybe when the official api is ready. The classes that you miss are in this dependency:

           

              <dependency>

                <groupId>org.jboss.as</groupId>

                <artifactId>jboss-as-websockets</artifactId>

                <scope>provided</scope>

              </dependency>

           

          They are included in the pom, what I do read it that it is not supported on JBoss AS 6 as the name of the servlet also implies, there is also a commit from Mike Brock from 24-2-2013 that saids that it's no longer supported. So my suggestion would be to try and update to an higher version of Errai and JBoss AS to see if that fixes the problem.

           

          Cheers,

                 Erik Jan

          1 of 1 people found this helpful
          • 2. Re: How ready are Websockets?
            Michel Werren Novice

            Hello Erik

             

            Yes of course, i already have seen this dependency, but in the JBoss7Websocket servlet the frame classes are imported for the package "org.jboss.as.websockets", but the correct package of the frame classes in the jboss-as-websockets dependency is "org.jboss.websockets.frame". Because that, this will end in a compiler error for me when i try to build Errai from sources.

             

            I use JBoss EAP 6.1.Final, thats based on JBoss AS 7.2.0.Final.

             

            I think so, to continue an own implementation makes maybe no sense when a standardized API comes with JEE7. Unfortunately this maybe comes too late for our first release, because the target  is  January of 2014. Maybe this issue: [#ERRAI-527] Resolve websockets to be no longer dependend on Alpha's - JBoss Issue Tracker solves this. Otherwise we should do the first release with Comet and switch in a later release to websockets.

             

            Regards

            Michel

            • 3. Re: How ready are Websockets?
              Erik Jan de Wit Novice

              Hi Michel,

               

              We have a continues build and all our code builds from the source the package of the Frame class is "org.jboss.as.websockets" and it's included as such. Maybe see that you have a fresh checked out project and try to build again?

               

              Ahh sorry about the confusion over which version of JBoss you are using, but with that version it should work.

               

              I've tried it myself and I couldn't reproduce the connection problems that you are experiencing could you maybe send a small project setup so that we can reproduce the problem and see what is going on?

               

              Cheers,

                      Erik Jan

              • 4. Re: How ready are Websockets?
                Michel Werren Novice

                Hello Erik

                 

                Sorry for my late reply.

                 

                The missing package was really a strange import problem.

                 

                I have attached a test project. I can not exactly reproduce, the behavior is different from start to start of the AS. Also reloading of the page few time can help. When i try in the dev mode, no error was shown in the log, only in the firebug console an error occur after ~10 sec with the message "Firefox can't establish a connection to the server at ws://localhost:8080/websockets-test/in.erraiBusWS"

                 

                I tested it with a maintained JBoss AS 7.1.1.Final (Replaced jbossweb module), but also with an original JBoss EAP 6.1.Final with installed APR on Linux Mint. As browser i have used Firefox 23.

                 

                I hope this help

                 

                Regard

                Michel

                • 5. Re: How ready are Websockets?
                  Erik Jan de Wit Novice

                  Hi Michel,

                   

                  What I notice is that the port is wrong, errai starts a separate server to handle the websockets and that defaults to port 8085. I added this property in my ErraiService.properties

                   

                  errai.bus.web_socket_url=/errai-tutorial/in.erraiBusWS

                   

                  so in your example that should be /websockets-test/in.erraiBusWS

                   

                  also to see if the connection is established you can type errai_status() in your webbrowser console.Screen%2BShot%2B2012-02-20%2Bat%2B4.29.50%2BPM.png

                   

                  Hope that helps,

                       Erik Jan

                  • 6. Re: How ready are Websockets?
                    Michel Werren Novice

                    Hello Erik

                     

                    As i understand, there are two possible websocket connectivities. One with the separate websocket server and on the other side the servlet. As i know the port 8085 is used as default for the separate server. But when to work with an additional websocket servlet, this separate websocket server is not started since the websocket processing will be done through this additional servlet, or i am wrong?

                     

                    Regards

                    Michel

                    • 7. Re: How ready are Websockets?
                      Erik Jan de Wit Novice

                      Hi Michel,

                       

                      Yes you are right my configuration was trying it in both ways at the same time. So I retried and with just the servlet I get a 405 on all requests. I'll do some more investigation why that is. When I run a errai_status() it seems that my bus remains in a state of trying to connect. But with the separate server it seems to work, maybe you can try that as well?

                       

                      Cheers,

                           Erik Jan

                      • 8. Re: How ready are Websockets?
                        Michel Werren Novice

                        Hello Erik

                         

                        I think you try on JBoss EAP 6.1.Final? The reason for the 405 is the missing APR installation. Here is the manual to install it: JBoss Web - Apache Portable Runtime and JBoss Web

                         

                        With the separate server i can establish the connection as well, but as i understand, this server doesn't run in the AS Servlet Container, and therefore the scopes on the services doesn't work properly. In our application the login service has an injection point for that the corresponding injection target is javax.enterprise.context.SessionScoped scoped. Here i get the following exception:

                         

                        14:35:14,703 ERROR [org.jboss.ejb3.invocation] (pool-15-thread-1) JBAS014134: EJB Invocation failed on component SecurityServiceImpl for method public abstract ch.apkern.achilles.apisecurity.client.session.ClientSessionDto ch.apkern.achilles.apisecurity.service.SecurityService.getClientSessionDto(): javax.ejb.EJBException: org.jboss.weld.context.ContextNotActiveException: WELD-001303 No active contexts for scope type javax.enterprise.context.SessionScoped

                         

                        Regards

                        Michel

                        • 9. Re: How ready are Websockets?
                          Erik Jan de Wit Novice

                          Hi Michel,

                           

                          One thing that you could try is to update to 2.3.2.Final there have been a lot of bug fixes and that is the most stable version with regards to the bus. I must admit that we haven't tried websockets for a while and like I said before it's very experimental. There could be support for CDI in the separate server implementation.

                           

                          Cheers,

                               Erik Jan

                          1 of 1 people found this helpful
                          • 10. Re: How ready are Websockets?
                            Michel Werren Novice

                            Hello Erik

                            I tried 2.3.2.Final, but the same behavior.

                             

                            I looked a bit into the code and maybe found at least one problem with the Sec-Websocket-Protocol header param. In the class org.jboss.errai.bus.client.framework.ClientWebSocketChannel, the handshake will be started without defined protocols. On the other side, the org.jboss.errai.bus.server.servlet.JBossAS7WebSocketServlet defines the "J.REP1.0/ErraiBus" protocol. The error information in Firebug was very poor, but Google Chrome brings up this error exactly. I have checked out the 2.2.0.Final tag and recompiled with an equivalent protocol on both sides and it works.

                             

                            But now, the handshake is very slow (over 20 sec).

                             

                            Is it scheduled, to fix the Websocket implementation?

                             

                            Regards

                            Michel

                            • 11. Re: How ready are Websockets?
                              Cristian Miranda Newbie

                              Hi Michel,

                               

                                   I'm using Errai 3.0-SNAPSHOT. Is there good documentation on how to implement WebSockets in JBoss AS ? I'm following this: http://docs.jboss.org/errai/3.0.0.20140214-M4/errai/reference/html_single/#sid-53380177 but JBossAS7WebSocketServlet is not being resolved, same thing with WebSocketServlet.

                                 

                                   Were you able to solve this?

                               

                              Thanks!

                              Regards,

                              • 12. Re: How ready are Websockets?
                                Victor Wjugow Newbie

                                        <dependency>

                                            <groupId>org.jboss.errai</groupId>

                                            <artifactId>errai-bus-jboss7-websocket</artifactId>

                                            <version>${errai.version}</version>

                                        </dependency>

                                        <dependency>

                                            <groupId>org.jboss.as</groupId>

                                            <artifactId>jboss-as-websockets</artifactId>

                                            <version>0.2.Alpha1</version>

                                            <scope>provided</scope>

                                        </dependency>

                                • 13. Re: How ready are Websockets?
                                  Michel Werren Novice

                                  Hi together

                                   

                                  There is also now a JSR-356 implementation, when you use eg. Tomcat 7 / 8 or the Weld version for Wildfly 8.x with CDI builtin scope support.

                                   

                                  <dependency>

                                    <groupId>org.jboss.errai</groupId>

                                    <artifactId>errai-bus-jsr356-websocket</artifactId>

                                    <version>3.1.0-SNAPSHOT</version>

                                  </dependency>

                                   

                                  <dependency>

                                    <groupId>org.jboss.errai</groupId>

                                    <artifactId>errai-bus-jsr356-websocket-weld</artifactId>

                                    <version>3.1.0-SNAPSHOT</version>

                                  </dependency>

                                   

                                  Regards

                                  Michel