Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not A Problem
    • Affects Version/s: 6.5.0
    • Fix Version/s: None
    • Component/s: wicket-atmosphere
    • Labels:
      None

      Description

      I played around with the AtmosphereExample, and got it already working. I just noticed, that WebSockets requests are marked as "501 Not supported" even that I'm running on a Jetty 8.
      So I added

      org.atmosphere.cpr.asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket

      to the init parameter, now the browser is able to open a Websocket connection

      [TRACE][qtp29683960-23      ] Destroyed request AtmosphereRequest{ contextPath= servletPath=/atmosphere pathInfo=/home requestURI=/atmosphere/home requestURL=http://localhost:9999/atmosphere/home destroyable=false} and response AtmosphereResponse{cookies=[], headers={}, asyncIOWriter=null, status=200, statusMessage='OK', charSet='UTF-8', contentLength=-1, contentType='text/html', isCommited=false, locale=null, headerHandled=false, atmosphereRequest=null, writeStatusAndHeader=true, delegateToNativeResponse=true, destroyable=true, response=HTTP/1.1 101 
      X-Atmosphere-tracking-id: 22e2d939-dc28-4560-9d98-09218821db15
      Upgrade: WebSocket
      Connection: Upgrade
      Sec-WebSocket-Accept: mWh1DvxTVpaFW3tz9aoFbRZB7XI=
      
      } [org.atmosphere.cpr.AsyncSupportListenerAdapter] 
      [INFO ][qtp29683960-23      ] registered page 0 for session izxepsmr8z9c13a613wi0puaf [org.apache.wicket.atmosphere.EventBus] 
      [TRACE][qtp29683960-23      ] Invoking listener with AtmosphereResourceEventImpl{isCancelled=false,
       isResumedOnTimeout=false,
       throwable=null,
       message=null,
      	 resource=AtmosphereResourceImpl{
       hasCode32893823,
       action=Action{timeout=-1, type=SUSPEND},
       broadcaster=org.atmosphere.cpr.DefaultBroadcaster,
       asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket@381a53,
       serializer=null,
       isInScope=true,
       useWriter=true,
       listeners=[org.apache.wicket.atmosphere.AtmosphereBehavior@1e22c75]}} [org.atmosphere.cpr.AtmosphereResourceImpl] 
      [INFO ][qtp29683960-23      ] Suspending the websocket response from ip 127.0.0.1:40610 [org.apache.wicket.atmosphere.AtmosphereBehavior] 
      

      But when I now post an event the following exception occurs:

      [ERROR][pool-9-thread-1     ] Unexpected error occurred [org.apache.wicket.DefaultExceptionMapper] 
      java.lang.IllegalArgumentException: Argument 'page' may not be null.
      	at org.apache.wicket.util.lang.Args.notNull(Args.java:41) ~[wicket-util-6.5.0.jar:6.5.0]
      	at org.apache.wicket.ajax.AjaxRequestHandler.<init>(AjaxRequestHandler.java:112) ~[wicket-core-6.5.0.jar:6.5.0]
      	at org.apache.wicket.protocol.http.WebApplication$DefaultAjaxRequestTargetProvider.get(WebApplication.java:961) ~[wicket-core-6.5.0.jar:6.5.0]
      	at org.apache.wicket.protocol.http.WebApplication$DefaultAjaxRequestTargetProvider.get(WebApplication.java:954) ~[wicket-core-6.5.0.jar:6.5.0]
      	at org.apache.wicket.protocol.http.WebApplication.newAjaxRequestTarget(WebApplication.java:805) ~[wicket-core-6.5.0.jar:6.5.0]
      	at org.apache.wicket.atmosphere.AtmosphereRequestHandler.respond(AtmosphereRequestHandler.java:68) ~[wicket-atmosphere-0.7.jar:0.7]
      	at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840) ~[wicket-core-6.5.0.jar:6.5.0]
      	at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-6.5.0.jar:6.5.0]
      	at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254) [wicket-core-6.5.0.jar:6.5.0]
      	at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211) [wicket-core-6.5.0.jar:6.5.0]
      	at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282) [wicket-core-6.5.0.jar:6.5.0]
      	at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:305) [wicket-atmosphere-0.7.jar:0.7]
      	at org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:282) [wicket-atmosphere-0.7.jar:0.7]
      	at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:258) [wicket-atmosphere-0.7.jar:0.7]
      	at de.laeubisoft.wicket.test.atmosphere.AtmosphereApplication$1.run(AtmosphereApplication.java:62) [de.laeubisoft.wicket.test/:na]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_23]
      	at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [na:1.6.0_23]
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [na:1.6.0_23]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [na:1.6.0_23]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [na:1.6.0_23]
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [na:1.6.0_23]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_23]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_23]
      	at java.lang.Thread.run(Thread.java:662) [na:1.6.0_23]
      

      It seems for any reason Wicket lost a reference to the page...

      This is the complete List of ini-parameters used:

      org.atmosphere.useBlocking=false
      org.atmosphere.useWebSocket=true
      org.atmosphere.useNative=true
      org.atmosphere.useStream=true
      org.atmosphere.cpr.sessionSupport=false
      org.atmosphere.cpr.CometSupport.maxInactiveActivity = 10000
      filterMappingUrlPattern=/*
      org.atmosphere.cpr.asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket
      org.atmosphere.websocket.WebSocketProtocol=org.atmosphere.websocket.protocol.EchoProtocol
      org.atmosphere.cpr.broadcastFilterClasses=org.apache.wicket.atmosphere.TrackMessageSizeFilter
      org.atmosphere.cpr.Broadcaster.supportOutOfOrderBroadcast=true
      org.atmosphere.cpr.broadcaster.maxProcessingThreads=10
      org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads=10

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        20h 59m 1 Emond Papegaaij 11/Feb/13 07:55
        Resolved Resolved Closed Closed
        1d 4h 41m 1 Christoph Läubrich 12/Feb/13 12:37
        Christoph Läubrich made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Christoph Läubrich added a comment -

        org.atmosphere.cpr.sessionSupport=true seem to fix the problem, thanks!

        Show
        Christoph Läubrich added a comment - org.atmosphere.cpr.sessionSupport=true seem to fix the problem, thanks!
        Emond Papegaaij made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Problem [ 8 ]
        Hide
        Emond Papegaaij added a comment -

        You probably forgot to enable session support in Atmosphere:

        <init-param>
        <param-name>org.atmosphere.cpr.sessionSupport</param-name>
        <param-value>true</param-value>
        </init-param>

        If that's not the problem, please demonstrate the problem with a quickstart and reopen the ticket.

        Show
        Emond Papegaaij added a comment - You probably forgot to enable session support in Atmosphere: <init-param> <param-name>org.atmosphere.cpr.sessionSupport</param-name> <param-value>true</param-value> </init-param> If that's not the problem, please demonstrate the problem with a quickstart and reopen the ticket.
        Christoph Läubrich made changes -
        Field Original Value New Value
        Description I played around with the AtmosphereExample, and got it already working. I just noticed, that WebSockets requests are marked as "501 Not supported" even that I'm running on a Jetty 8.
        So I added {code}org.atmosphere.cpr.asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket{code}
        to the init parameter, now the browser is able to open a Websocket connection
        {code}[TRACE][qtp29683960-23 ] Destroyed request AtmosphereRequest{ contextPath= servletPath=/atmosphere pathInfo=/home requestURI=/atmosphere/home requestURL=http://localhost:9999/atmosphere/home destroyable=false} and response AtmosphereResponse{cookies=[], headers={}, asyncIOWriter=null, status=200, statusMessage='OK', charSet='UTF-8', contentLength=-1, contentType='text/html', isCommited=false, locale=null, headerHandled=false, atmosphereRequest=null, writeStatusAndHeader=true, delegateToNativeResponse=true, destroyable=true, response=HTTP/1.1 101
        X-Atmosphere-tracking-id: 22e2d939-dc28-4560-9d98-09218821db15
        Upgrade: WebSocket
        Connection: Upgrade
        Sec-WebSocket-Accept: mWh1DvxTVpaFW3tz9aoFbRZB7XI=

        } [org.atmosphere.cpr.AsyncSupportListenerAdapter]
        [INFO ][qtp29683960-23 ] registered page 0 for session izxepsmr8z9c13a613wi0puaf [org.apache.wicket.atmosphere.EventBus]
        [TRACE][qtp29683960-23 ] Invoking listener with AtmosphereResourceEventImpl{isCancelled=false,
         isResumedOnTimeout=false,
         throwable=null,
         message=null,
        resource=AtmosphereResourceImpl{
         hasCode32893823,
         action=Action{timeout=-1, type=SUSPEND},
         broadcaster=org.atmosphere.cpr.DefaultBroadcaster,
         asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket@381a53,
         serializer=null,
         isInScope=true,
         useWriter=true,
         listeners=[org.apache.wicket.atmosphere.AtmosphereBehavior@1e22c75]}} [org.atmosphere.cpr.AtmosphereResourceImpl]
        [INFO ][qtp29683960-23 ] Suspending the websocket response from ip 127.0.0.1:40610 [org.apache.wicket.atmosphere.AtmosphereBehavior] {code}
        But when I now post an event the following exception occurs:
        {code}[ERROR][pool-9-thread-1 ] Unexpected error occurred [org.apache.wicket.DefaultExceptionMapper]
        java.lang.IllegalArgumentException: Argument 'page' may not be null.
        at org.apache.wicket.util.lang.Args.notNull(Args.java:41) ~[wicket-util-6.5.0.jar:6.5.0]
        at org.apache.wicket.ajax.AjaxRequestHandler.<init>(AjaxRequestHandler.java:112) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.protocol.http.WebApplication$DefaultAjaxRequestTargetProvider.get(WebApplication.java:961) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.protocol.http.WebApplication$DefaultAjaxRequestTargetProvider.get(WebApplication.java:954) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.protocol.http.WebApplication.newAjaxRequestTarget(WebApplication.java:805) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.atmosphere.AtmosphereRequestHandler.respond(AtmosphereRequestHandler.java:68) ~[wicket-atmosphere-0.7.jar:0.7]
        at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-6.5.0.jar:6.5.0]
        at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254) [wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211) [wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282) [wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:305) [wicket-atmosphere-0.7.jar:0.7]
        at org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:282) [wicket-atmosphere-0.7.jar:0.7]
        at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:258) [wicket-atmosphere-0.7.jar:0.7]
        at de.laeubisoft.wicket.test.atmosphere.AtmosphereApplication$1.run(AtmosphereApplication.java:62) [de.laeubisoft.wicket.test/:na]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_23]
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [na:1.6.0_23]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [na:1.6.0_23]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [na:1.6.0_23]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [na:1.6.0_23]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [na:1.6.0_23]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_23]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_23]
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_23]{code}
        It seems for any reason Wicket lost a reference to the page...

        This is the complete List of ini-parameters used:{code}org.atmosphere.useBlocking=false
        org.atmosphere.useWebSocket=true
        org.atmosphere.useNative=true
        org.atmosphere.useStream=true
        org.atmosphere.cpr.sessionSupport=false
        org.atmosphere.cpr.CometSupport.maxInactiveActivity = 10000
        filterMappingUrlPattern=/*
        org.atmosphere.cpr.asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket
        org.atmosphere.websocket.WebSocketProtocol=org.atmosphere.websocket.protocol.EchoProtocol
        org.atmosphere.cpr.broadcastFilterClasses=org.apache.wicket.atmosphere.TrackMessageSizeFilter
        org.atmosphere.cpr.Broadcaster.supportOutOfOrderBroadcast=true
        org.atmosphere.cpr.broadcaster.maxProcessingThreads=10
        org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads=10{code}
        I played around with the AtmosphereExample, and got it already working. I just noticed, that WebSockets requests are marked as "501 Not supported" even that I'm running on a Jetty 8.
        So I added
        {code}
        org.atmosphere.cpr.asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket{code}
        to the init parameter, now the browser is able to open a Websocket connection
        {code}[TRACE][qtp29683960-23 ] Destroyed request AtmosphereRequest{ contextPath= servletPath=/atmosphere pathInfo=/home requestURI=/atmosphere/home requestURL=http://localhost:9999/atmosphere/home destroyable=false} and response AtmosphereResponse{cookies=[], headers={}, asyncIOWriter=null, status=200, statusMessage='OK', charSet='UTF-8', contentLength=-1, contentType='text/html', isCommited=false, locale=null, headerHandled=false, atmosphereRequest=null, writeStatusAndHeader=true, delegateToNativeResponse=true, destroyable=true, response=HTTP/1.1 101
        X-Atmosphere-tracking-id: 22e2d939-dc28-4560-9d98-09218821db15
        Upgrade: WebSocket
        Connection: Upgrade
        Sec-WebSocket-Accept: mWh1DvxTVpaFW3tz9aoFbRZB7XI=

        } [org.atmosphere.cpr.AsyncSupportListenerAdapter]
        [INFO ][qtp29683960-23 ] registered page 0 for session izxepsmr8z9c13a613wi0puaf [org.apache.wicket.atmosphere.EventBus]
        [TRACE][qtp29683960-23 ] Invoking listener with AtmosphereResourceEventImpl{isCancelled=false,
         isResumedOnTimeout=false,
         throwable=null,
         message=null,
        resource=AtmosphereResourceImpl{
         hasCode32893823,
         action=Action{timeout=-1, type=SUSPEND},
         broadcaster=org.atmosphere.cpr.DefaultBroadcaster,
         asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket@381a53,
         serializer=null,
         isInScope=true,
         useWriter=true,
         listeners=[org.apache.wicket.atmosphere.AtmosphereBehavior@1e22c75]}} [org.atmosphere.cpr.AtmosphereResourceImpl]
        [INFO ][qtp29683960-23 ] Suspending the websocket response from ip 127.0.0.1:40610 [org.apache.wicket.atmosphere.AtmosphereBehavior]
        {code}

        But when I now post an event the following exception occurs:
        {code}
        [ERROR][pool-9-thread-1 ] Unexpected error occurred [org.apache.wicket.DefaultExceptionMapper]
        java.lang.IllegalArgumentException: Argument 'page' may not be null.
        at org.apache.wicket.util.lang.Args.notNull(Args.java:41) ~[wicket-util-6.5.0.jar:6.5.0]
        at org.apache.wicket.ajax.AjaxRequestHandler.<init>(AjaxRequestHandler.java:112) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.protocol.http.WebApplication$DefaultAjaxRequestTargetProvider.get(WebApplication.java:961) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.protocol.http.WebApplication$DefaultAjaxRequestTargetProvider.get(WebApplication.java:954) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.protocol.http.WebApplication.newAjaxRequestTarget(WebApplication.java:805) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.atmosphere.AtmosphereRequestHandler.respond(AtmosphereRequestHandler.java:68) ~[wicket-atmosphere-0.7.jar:0.7]
        at org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:840) ~[wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64) ~[wicket-request-6.5.0.jar:6.5.0]
        at org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:254) [wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:211) [wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:282) [wicket-core-6.5.0.jar:6.5.0]
        at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:305) [wicket-atmosphere-0.7.jar:0.7]
        at org.apache.wicket.atmosphere.EventBus.postToSingleResource(EventBus.java:282) [wicket-atmosphere-0.7.jar:0.7]
        at org.apache.wicket.atmosphere.EventBus.post(EventBus.java:258) [wicket-atmosphere-0.7.jar:0.7]
        at de.laeubisoft.wicket.test.atmosphere.AtmosphereApplication$1.run(AtmosphereApplication.java:62) [de.laeubisoft.wicket.test/:na]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_23]
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [na:1.6.0_23]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [na:1.6.0_23]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [na:1.6.0_23]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [na:1.6.0_23]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [na:1.6.0_23]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_23]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_23]
        at java.lang.Thread.run(Thread.java:662) [na:1.6.0_23]
        {code}

        It seems for any reason Wicket lost a reference to the page...

        This is the complete List of ini-parameters used:{code}org.atmosphere.useBlocking=false
        org.atmosphere.useWebSocket=true
        org.atmosphere.useNative=true
        org.atmosphere.useStream=true
        org.atmosphere.cpr.sessionSupport=false
        org.atmosphere.cpr.CometSupport.maxInactiveActivity = 10000
        filterMappingUrlPattern=/*
        org.atmosphere.cpr.asyncSupport=org.atmosphere.container.JettyAsyncSupportWithWebSocket
        org.atmosphere.websocket.WebSocketProtocol=org.atmosphere.websocket.protocol.EchoProtocol
        org.atmosphere.cpr.broadcastFilterClasses=org.apache.wicket.atmosphere.TrackMessageSizeFilter
        org.atmosphere.cpr.Broadcaster.supportOutOfOrderBroadcast=true
        org.atmosphere.cpr.broadcaster.maxProcessingThreads=10
        org.atmosphere.cpr.broadcaster.maxAsyncWriteThreads=10{code}
        Christoph Läubrich created issue -

          People

          • Assignee:
            Emond Papegaaij
            Reporter:
            Christoph Läubrich
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development