1 Reply Latest reply on Jan 10, 2013 12:23 PM by Roberto Contiero

    richfaces 4 + seam 2.3 a4j:push fires long-polling request on wrong URL

    duc tun vu Newbie

      Hi guys,

       

      we are implementing  a push function with <a4j:push> and facing this following issue:

       

      We have checked how the a4j:push component on the Showcase site works, client-side, and see that the push component fires

       

      one POST request to #{contextPath}/rfRes/org.richfaces.resource.PushResource.xhtml

       

      and then followed by the GET long-polling requests on URL #{contextPath}/__richfaces_push?....

       

       

      But the component behaves different with our application. The first one POST request also goes on #{contextPath}/rfRes/org.richfaces.resource.PushResource.xhtml , but the following GET long-polling requests are NOT fired on the URL #{contextPath}/__richfaces_push?.... as with the Showcase. They are still fired on the first URL #{contextPath}/rfRes/org.richfaces.resource.PushResource.xhtml and that results the following exception on server-side:

       

       

       

      21:02:22,225 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/omt].[Faces Servlet]] (http-localhost-127.0.0.1-8080-6) Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalArgumentException

          at org.richfaces.resource.PushResource.encode(PushResource.java:85) [richfaces-components-ui-4.2.2.Final.jar:4.2.2.Final]

          at org.richfaces.resource.UserResourceWrapperImpl.encode(UserResourceWrapperImpl.java:188) [richfaces-core-impl-4.2.2.Final.jar:4.2.2.Final]

          at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:224) [richfaces-core-impl-4.2.2.Final.jar:4.2.2.Final]

          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:591) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:60) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam-2.3.0.Final.jar:2.3.0.Final]

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397) [jbossweb-7.0.13.Final.jar:]

          at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

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

          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]

       

       

       

      And my question is how to get the GET long-polling request fired on the correct URL?

       

      Out stack: JBoss 7.1, Richfaces 4.2.2, Seam 2.3.

       

      Thank you very much for any help and suggestion!