[
https://issues.apache.org/jira/browse/WICKET-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Christoph Läubrich closed WICKET-5033.
--------------------------------------
org.atmosphere.cpr.sessionSupport=true seem to fix the problem, thanks!
> Websockets fail
> ---------------
>
> Key: WICKET-5033
> URL: https://issues.apache.org/jira/browse/WICKET-5033
> Project: Wicket
> Issue Type: Bug
> Components: wicket-atmosphere
> Affects Versions: 6.5.0
> Reporter: Christoph Läubrich
> Assignee: Emond Papegaaij
>
> 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}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira