2 Replies Latest reply on Nov 12, 2015 10:23 AM by francesco.81 Branched from an earlier discussion.

    UnsupportedOperationException with websockets

    francesco.81

      Hello Tomaz,

      Thanks for the reply.

      I do not want to use a jbossWeb Module. I must enable the protocoll NIO2 for use websocket.   I not able to enable this protocol.

      My error is :

      ERROR it.xxx.websocket.main.WebSocksServer - Errore WebSocket!

      java.lang.UnsupportedOperationException

              at java.nio.ByteBuffer.array(ByteBuffer.java:959)

              at it.xxx.websocket.main.WebSocksServer.onMessage(WebSocksServer.java:94)

              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

              at java.lang.reflect.Method.invoke(Method.java:606)

              at io.undertow.websockets.jsr.annotated.BoundMethod.invoke(BoundMethod.java:87)

              at io.undertow.websockets.jsr.annotated.AnnotatedEndpoint$2$1.run(AnnotatedEndpoint.java:154)

              at io.undertow.websockets.jsr.ServerWebSocketContainer.invokeEndpointMethod(ServerWebSocketContainer.java:362)

              at io.undertow.websockets.jsr.annotated.AnnotatedEndpoint$2.onMessage(AnnotatedEndpoint.java:149)

              at io.undertow.websockets.jsr.FrameHandler$6.run(FrameHandler.java:208)

              at io.undertow.websockets.jsr.ServerWebSocketContainer.invokeEndpointMethod(ServerWebSocketContainer.java:362)

              at io.undertow.websockets.jsr.ServerWebSocketContainer$3.run(ServerWebSocketContainer.java:347)

              at io.undertow.websockets.jsr.OrderedExecutor$ExecutorTask.run(OrderedExecutor.java:67)

              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)

      [ERROR]  stderr - java.lang.UnsupportedOperationException

       

      Can you help me ?

       

      Thank you very much

      Francesco