Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-4230

WebSocket Server not usable in Infinispan Server

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.0.0.Alpha3
    • Fix Version/s: 7.0.0.Alpha4
    • Component/s: Server
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1) Build the server

      cd server/integration/
      mvn clean package -Dmaven.test.skip=true
      

      2) Run it

      cd build/target/infinispan-server-7.0.0-SNAPSHOT/; bin/standalone.sh

      3) Chat with the websocket.
      Go to http://www.websocket.org/echo.html,
      set “ws://localhost:8181” as Location,
      click connect and try to send a message containing

      { "opCode" : "get", "cacheName" : default, "key" : test }
      

      Server closes the channel and doesn’t even connect to the web socket:

      Show
      1) Build the server cd server/integration/ mvn clean package -Dmaven.test.skip= true 2) Run it cd build/target/infinispan-server-7.0.0-SNAPSHOT/; bin/standalone.sh 3) Chat with the websocket. Go to http://www.websocket.org/echo.html , set “ws://localhost:8181” as Location, click connect and try to send a message containing { "opCode" : "get" , "cacheName" : default , "key" : test } Server closes the channel and doesn’t even connect to the web socket:

      Description

      There's a dependency missing in the websocket module that causes it to throw the exception when connecting

      09:14:10,827 WARNING [io.netty.channel.ChannelInitializer] (WebSocketServerWorker-1) Failed to initialize a channel. Closing: [id: 0x93a75f0c, /127.0.0.1:64170 => /127.0.0.1:8181]: java.lang.NoClassDefFoundError: org/json/JSONException
      	at org.infinispan.server.websocket.WebSocketServer$WebSocketServerPipelineFactory.initChannel(WebSocketServer.java:90) [infinispan-server-websocket-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
      	at io.netty.channel.ChannelInitializer.channelRegistered(ChannelInitializer.java:69) [netty-all-4.0.18.Final.jar:4.0.18.Final]
      	at io.netty.channel.DefaultChannelHandlerContext.invokeChannelRegistered(DefaultChannelHandlerContext.java:166) [netty-all-4.0.18.Final.jar:4.0.18.Final]
      	…
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_55]
      Caused by: java.lang.ClassNotFoundException: org.json.JSONException from [Module "org.infinispan.server.websocket:main" from local module loader @326d888e (finder: local module finder @35203c7f (roots: /Users/applevtnc/Source/github/infinispan-fork/server/integration/build/target/infinispan-server-7.0.0-SNAPSHOT/modules,/Users/applevtnc/Source/github/infinispan-fork/server/integration/build/target/infinispan-server-7.0.0-SNAPSHOT/modules/system/layers/base))]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.2.0.CR1]
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1]
      	…
      
      
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                gustavonalle Gustavo Fernandes
                Reporter:
                gustavonalle Gustavo Fernandes
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: