1 Reply Latest reply on Apr 10, 2013 3:07 PM by jadtn

    [RF 4.3.1.Final]A4j;push  NPE in org.richfaces.application.push.impl.RequestImpl.onBroadcast(RequestImpl.java:166

    jadtn

      Hi,

      I got strange exception sometimes with a4j:push

      (AS 6.1 alpha / RF4.3.1 Final)

      I try to reproduce the problem  systematicaly, but actually i don t found, it s seems to be very occasionaly.  May be the stacktrace tells something to anyone?

       

      it's seem  getSession() is null in RequestImpl 166., I don't know if it has a rapport with sometimes i m logged and open a popup wich use a4j:push and something logout me (don't know why, it s only with a page with a4j:push) .. I don t know how to reproduce the problem systematicaly, but it seems to appears particulary when i open the popup with a4j:push and the server started.

      In the case i m aleatory logout , i have'nt this exception at each time.

       

      Thanks

      Adrien

       

      2:53:01,576 SEVERE [org.richfaces.log.Application] (http-/0.0.0.0:80-4) null: java.lang.NullPointerException

                at org.richfaces.application.push.impl.RequestImpl.onBroadcast(RequestImpl.java:166) [richfaces-core-impl-4.3.1.Final.jar:4.3.1.Final]

                at org.atmosphere.cpr.AtmosphereResourceImpl.onBroadcast(AtmosphereResourceImpl.java:823) [atmosphere-runtime-1.0.10.jar:1.0.10]

                at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:770) [atmosphere-runtime-1.0.10.jar:1.0.10]

                at org.atmosphere.cpr.AtmosphereResourceImpl.notifyListeners(AtmosphereResourceImpl.java:742) [atmosphere-runtime-1.0.10.jar:1.0.10]

                at org.atmosphere.cpr.AsynchronousProcessor.timedout(AsynchronousProcessor.java:471) [atmosphere-runtime-1.0.10.jar:1.0.10]

                at org.atmosphere.container.Servlet30CometSupport$CometListener.onTimeout(Servlet30CometSupport.java:218) [atmosphere-runtime-1.0.10.jar:1.0.10]

                at org.apache.catalina.core.StandardWrapperValve.async(StandardWrapperValve.java:523) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.core.StandardWrapperValve.event(StandardWrapperValve.java:349) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.core.StandardContextValve.event(StandardContextValve.java:171) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.core.StandardHostValve.event(StandardHostValve.java:247) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.valves.ValveBase.event(ValveBase.java:185) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.core.StandardEngineValve.event(StandardEngineValve.java:121) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.catalina.connector.CoyoteAdapter.event(CoyoteAdapter.java:228) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.coyote.http11.Http11Processor.event(Http11Processor.java:740) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.event(Http11Protocol.java:606) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:907) [jbossweb-7.2.0.Final.jar:7.2.0.Final]

                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_38]

        • 1. Re: [RF 4.3.1.Final]A4j;push  NPE in org.richfaces.application.push.impl.RequestImpl.onBroadcast(RequestImpl.java:166
          jadtn

          Hi

          I've found the problem.

          The cause was a  javascript alert in the browser. this alert 'block' certainly something in the push communication.

          I you have 2 frame/tab in the browser: on the first tab you display the alert  (in bold) and try to login on the second tab and reuse a4:push -->you are logout.

          Alert on a4j:push event seems to be a very bad idea.

          Maybe if someone know an asynchronous alert i'm interested :-)

          Adrien

           

           

          <h:form>

          <a4j:push onerror="alert('Erreur. Fermer puis relancer le chat');" address="#{ctrlChatPushUser.queueId}"

                    ondataavailable=" onNewDataPush(event);">

              <a4j:ajax event="dataavailable" render="#{ctrlChatPushUser.toRerender}" oncomplete="scrollbottom();" />  

               <a4j:ajax event="subscribed" render="chatblock" />

          </a4j:push>

           

          </h:form>

           

           

          <h:outputScript target="head">

           

                 function onNewDataPush(event){

           

                        if(event.rf.data == 'logoutchat'){

                                 alert('End Chat Session');//this lock page with the alert , then if you try to login by another tab in browser and reinitialise a push for this user your are logout

                                 self.close();

                               }

                               if(strStartsWith(event.rf.data,'blacklist:')){

                                            alert(event.rf.data);

                               }

               }

           

           

          </h:outputScript>