[ 
https://issues.apache.org/jira/browse/WICKET-4965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Emond Papegaaij resolved WICKET-4965.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 6.5.0

Resources are no longer unregistered during shutdown now, preventing the NPE 
(which also occurs on Jetty by the way).
                
> NPE when stopping Tomcat
> ------------------------
>
>                 Key: WICKET-4965
>                 URL: https://issues.apache.org/jira/browse/WICKET-4965
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-atmosphere
>         Environment: Atmosphere 1.0.5, wicket-atmosphere 0.5
>            Reporter: Andrei Badea
>            Assignee: Emond Papegaaij
>             Fix For: 6.5.0
>
>
> {noformat}
> java.lang.NullPointerException: null
>     at org.apache.wicket.atmosphere.EventBus.get(EventBus.java:86)
>     at 
> org.apache.wicket.atmosphere.AtmosphereBehavior.findEventBus(AtmosphereBehavior.java:85)
>     at 
> org.apache.wicket.atmosphere.AtmosphereBehavior.onDisconnect(AtmosphereBehavior.java:182)
>     at 
> org.atmosphere.cpr.AtmosphereResourceImpl.onDisconnect(AtmosphereResourceImpl.java:809)
>     at 
> org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:754)
>     at 
> org.atmosphere.cpr.AtmosphereResourceImpl.resume(AtmosphereResourceImpl.java:327)
>     at 
> org.atmosphere.cpr.DefaultBroadcaster.resumeAll(DefaultBroadcaster.java:315)
>     at 
> org.atmosphere.cpr.DefaultBroadcasterFactory.destroy(DefaultBroadcasterFactory.java:307)
>     at 
> org.atmosphere.cpr.AtmosphereFramework.destroy(AtmosphereFramework.java:930)
>     at 
> org.atmosphere.cpr.AtmosphereServlet.destroy(AtmosphereServlet.java:186)
>     at 
> org.apache.catalina.core.StandardWrapper.unload(StandardWrapper.java:1465)
>     at 
> org.apache.catalina.core.StandardWrapper.stopInternal(StandardWrapper.java:1823)
>     at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
>     at 
> org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5463)
>     at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
>     at 
> org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575)
>     at 
> org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564)
>     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
>     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>     at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>     at java.lang.Thread.run(Thread.java:662)
> {noformat}
> The NPE occurs because the Wicket application has already been destroyed. It 
> it destroyed by the Wicket filter's destroy() method, which is invoked by 
> ReflectorServletProcessor.destroy(). AtmosphereFramework.destroy() first 
> destroys the handler, and then it destroys the broadcast factory (which 
> resumes the resources).
> Jean-Francois says the bug is not in Atmosphere: 
> https://github.com/Atmosphere/atmosphere/issues/812

--
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

Reply via email to