6 Replies Latest reply on Mar 4, 2013 10:51 AM by goga

    a4j:push Richfaces 4.3.Final Callback exceptionSyntaxError: Unexpected token in packed.js:2823

    goga Newbie

      Hi,

       

      I've upgraded richfaces from 4.2.3 to 4.3 (atmosphere from 0.84 to  1.0.1).. And now I have a lot of

      Callback exceptionSyntaxError: Unexpected token ... in packed.js;jsessionid=0UuQhGs5P80i2dqR7Q3FCzcR.undefined:2823

      exceptions in browser console when I open the page. Alert 'onsubscribed:undefuned' appears too but there is no any action on the button click

       

      the string in packed.js:

      2823 if(typeof B=="function"){B.apply(window.console,C)

      2824 }}},warn:function(){jQuery.atmosphere.log("warn",arguments)

      2825 },info:function(){jQuery.atmosphere.log("info",arguments)

      2826 },debug:function(){jQuery.atmosphere.log("debug",arguments)

      2827 },error:function(){jQuery.atmosphere.log("error",arguments)

      2828 }}

       

      test.xhtml page

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html"

          xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j"

          xmlns:rich="http://richfaces.org/rich">

          <h:head>

          </h:head>

          <h:form>

                <a4j:push address="errorCdi" ondataavailable="alert('dataavailable: ' + event.rf.data)" onerror="alert('error: ' + event.rf.data)"

                                              onsubscribed="alert('subscribed: ' + event.rf.data)" />

                <a4j:commandButton id="btnTest" value="Тест" styleClass="btn btn-primary" action="#{form.addEvent()}"/>

          </h:form>

      </ui:composition>

       

      java part

      public void addEvent() throws MessageException {

        final TopicKey topicKey = new TopicKey("errorCdi");

        final TopicsContext topicsContext = TopicsContext.lookup();

        topicsContext.publish(topicKey, result);

      }

       

      web.xml

      <web-app version="2.5"...

      ...


      <!-- Push Servlet - listens for user sessions -->

      <servlet>

      <servlet-name>Push Servlet</servlet-name>

      <servlet-class>org.richfaces.webapp.PushServlet</servlet-class>

      <load-on-startup>1</load-on-startup>

      </servlet>

      <servlet-mapping>

      <servlet-name>Push Servlet</servlet-name>

      <url-pattern>/__richfaces_push</url-pattern>

      </servlet-mapping>

      <context-param>

      <param-name>org.richfaces.push.handlerMapping</param-name>

      <param-value>/__richfaces_push</param-value>

      </context-param>

      <context-param>

      <param-name>org.atmosphere.useBlocking</param-name>

      <param-value>true</param-value>

      </context-param>

      ...

       

      Is this an issue in  4.3? May bу someone faced with a similar problem..