Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5733

ContextNotActiveException thrown when using both CDI & Native WebSocket

    Details

      Description

      Native Websockets does not works anymore while used in conjunction with CDI. Repro step are quite simple, please see attached quickstart.

      WARN [RequestCycleExtra] Handling the following exception: org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped
      at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:680) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
      at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:79) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
      at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99) [weld-core-impl-2.1.2.Final.jar:2014-01-09 09:23]
      at org.jboss.weld.proxies.Conversation$795552506$Proxy$_$$_WeldClientProxy.getId(Unknown Source) [weld-core-impl-2.1.2.Final.jar:]
      at org.apache.wicket.cdi.ConversationPropagator.onRequestHandlerResolved(ConversationPropagator.java:107) [wicket-cdi-1.1-7.0.0-20141021.124705-313.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:155) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:151) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80) [wicket-util-7.0.0-20141021.123902-532.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:150) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:155) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:151) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80) [wicket-util-7.0.0-20141021.123902-532.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:150) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:155) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection$5.notify(RequestCycleListenerCollection.java:151) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.util.listener.ListenerCollection.notify(ListenerCollection.java:80) [wicket-util-7.0.0-20141021.123902-532.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycleListenerCollection.onRequestHandlerResolved(RequestCycleListenerCollection.java:150) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:264) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293) [wicket-core-7.0.0-20141021.124144-486.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.broadcastMessage(AbstractWebSocketProcessor.java:219) [wicket-native-websocket-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.protocol.ws.api.AbstractWebSocketProcessor.onClose(AbstractWebSocketProcessor.java:157) [wicket-native-websocket-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
      at org.apache.wicket.protocol.ws.javax.WicketEndpoint.onClose(WicketEndpoint.java:71) [wicket-native-websocket-javax-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
      at io.undertow.websockets.jsr.UndertowSession.close(UndertowSession.java:181) [undertow-websockets-jsr-1.0.15.Final.jar:1.0.15.Final]
      at io.undertow.websockets.jsr.ServerWebSocketContainer.close(ServerWebSocketContainer.java:464) [undertow-websockets-jsr-1.0.15.Final.jar:1.0.15.Final]
      at io.undertow.websockets.jsr.Bootstrap$WebSocketListener.contextDestroyed(Bootstrap.java:82) [undertow-websockets-jsr-1.0.15.Final.jar:1.0.15.Final]
      at io.undertow.servlet.core.ApplicationListeners.contextDestroyed(ApplicationListeners.java:185) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
      at io.undertow.servlet.core.DeploymentImpl.destroy(DeploymentImpl.java:224) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
      at io.undertow.servlet.core.DeploymentManagerImpl.undeploy(DeploymentManagerImpl.java:572) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stopContext(UndertowDeploymentService.java:119)
      at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.stop(UndertowDeploymentService.java:101)
      at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2056)
      at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2017)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_65]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
      at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]

      Thanks & best regards,
      Sebastien

        Attachments

        1. quickstart-cdi-websocket-7.0.0-SNAPSHOT.zip
          25 kB
          Sebastien Briquet
        2. quickstart-cdi-websocket.zip
          25 kB
          Sebastien Briquet

          Issue Links

            Activity

              People

              • Assignee:
                mgrigorov Martin Grigorov
                Reporter:
                sebfz1 Sebastien Briquet
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: