[richfaces-issues] [JBoss JIRA] (RF-11894) PushHandlerFilter initialization fails when PushServlet registered manually

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Wed Jan 18 07:46:20 EST 2012


     [ https://issues.jboss.org/browse/RF-11894?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukáš Fryč updated RF-11894:
----------------------------

    Description: 
When {{PushContext}} is not touched before the {{PushHandlerImpl}} is initialized, {{SessionManager}} is not stored in the {{ServletContext}} attributes and initialization fails.

{{NullPointerException}} is thrown in this case:

{code}
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) java.lang.NullPointerException
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) 	at org.richfaces.webapp.PushHandlerFilter.init(PushHandlerFilter.java:64)
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.util.AtmosphereFilterChain.init(AtmosphereFilterChain.java:105)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.init(ReflectorServletProcessor.java:273)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.handler.ReflectorServletProcessor.init(ReflectorServletProcessor.java:164)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.cpr.AtmosphereServlet.initAtmosphereHandler(AtmosphereServlet.java:813)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:566)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.richfaces.webapp.PushServlet.init(PushServlet.java:98)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.lang.Thread.run(Thread.java:662)
{code}

Exception above can be hidden behind {{ServletException}} bellow:

{code}
12:52:47,369 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/new_project]] (MSC service thread 1-3) Servlet /new_project threw load() exception: javax.servlet.ServletException 
at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:577) [atmosphere-runtime-0.8.0-RC1.jar:] 
at org.richfaces.webapp.PushServlet.init(PushServlet.java:98) [richfaces-core-impl-4.1.0.Final.jar:] 
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.1.Final.jar:7.0.2.Final] 
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.1.Final.jar:7.0.2.Final] 
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631) [jbossweb-7.0.1.Final.jar:7.0.2.Final] 
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844) [jbossweb-7.0.1.Final.jar:7.0.2.Final] 
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final] 
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) 
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) 
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26] 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26] 
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26] 
{code}

  was:
When {{PushContext}} is not touched before the {{PushHandlerImpl}} is initialized, {{SessionManager}} is not stored in the {{ServletContext}} attributes and initialization fails.

{{NullPointerException}} is thrown in this case:

{code}
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) java.lang.NullPointerException
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) 	at org.richfaces.webapp.PushHandlerFilter.init(PushHandlerFilter.java:64)
12:55:43,883 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.util.AtmosphereFilterChain.init(AtmosphereFilterChain.java:105)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.init(ReflectorServletProcessor.java:273)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.handler.ReflectorServletProcessor.init(ReflectorServletProcessor.java:164)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.cpr.AtmosphereServlet.initAtmosphereHandler(AtmosphereServlet.java:813)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:566)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.richfaces.webapp.PushServlet.init(PushServlet.java:98)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.lang.Thread.run(Thread.java:662)
{code}


    
> PushHandlerFilter initialization fails when PushServlet registered manually
> ---------------------------------------------------------------------------
>
>                 Key: RF-11894
>                 URL: https://issues.jboss.org/browse/RF-11894
>             Project: RichFaces
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: core
>    Affects Versions: 4.1.0.Final
>            Reporter: Lukáš Fryč
>            Assignee: Lukáš Fryč
>             Fix For: 4.2.0.CR1
>
>
> When {{PushContext}} is not touched before the {{PushHandlerImpl}} is initialized, {{SessionManager}} is not stored in the {{ServletContext}} attributes and initialization fails.
> {{NullPointerException}} is thrown in this case:
> {code}
> 12:55:43,883 ERROR [stderr] (MSC service thread 1-3) java.lang.NullPointerException
> 12:55:43,883 ERROR [stderr] (MSC service thread 1-3) 	at org.richfaces.webapp.PushHandlerFilter.init(PushHandlerFilter.java:64)
> 12:55:43,883 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.util.AtmosphereFilterChain.init(AtmosphereFilterChain.java:105)
> 12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.handler.ReflectorServletProcessor$FilterChainServletWrapper.init(ReflectorServletProcessor.java:273)
> 12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.handler.ReflectorServletProcessor.init(ReflectorServletProcessor.java:164)
> 12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.cpr.AtmosphereServlet.initAtmosphereHandler(AtmosphereServlet.java:813)
> 12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:566)
> 12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.richfaces.webapp.PushServlet.init(PushServlet.java:98)
> 12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202)
> 12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102)
> 12:55:43,884 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631)
> 12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844)
> 12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70)
> 12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
> 12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
> 12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> 12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> 12:55:43,885 ERROR [stderr] (MSC service thread 1-3) 	at java.lang.Thread.run(Thread.java:662)
> {code}
> Exception above can be hidden behind {{ServletException}} bellow:
> {code}
> 12:52:47,369 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/new_project]] (MSC service thread 1-3) Servlet /new_project threw load() exception: javax.servlet.ServletException 
> at org.atmosphere.cpr.AtmosphereServlet.init(AtmosphereServlet.java:577) [atmosphere-runtime-0.8.0-RC1.jar:] 
> at org.richfaces.webapp.PushServlet.init(PushServlet.java:98) [richfaces-core-impl-4.1.0.Final.jar:] 
> at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1202) [jbossweb-7.0.1.Final.jar:7.0.2.Final] 
> at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1102) [jbossweb-7.0.1.Final.jar:7.0.2.Final] 
> at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3631) [jbossweb-7.0.1.Final.jar:7.0.2.Final] 
> at org.apache.catalina.core.StandardContext.start(StandardContext.java:3844) [jbossweb-7.0.1.Final.jar:7.0.2.Final] 
> at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final] 
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) 
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) 
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26] 
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26] 
> at java.lang.Thread.run(Thread.java:662) [:1.6.0_26] 
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the richfaces-issues mailing list