4 Replies Latest reply on Jan 20, 2011 4:27 AM by xalperte

    [Exception] TypeError: Object function Sarissa(){} has no method 'getParseErrorText'

    xalperte

      I'm experiencing something strange, this javascript error happens with any browser other than Firefox. The version of Richfaces is 3.3.2.SR1

       

      This error happens inside the following javascript:

          

           <script src="/tdbs-web/faces/rfResorg.ajax4jsf.javascript.AjaxScript" type="text/javascript"></script>

       

      I'm using richfaces in a portal (JBoss Portal 2.7.2, JBoss Portlet Bridge 1.0.0.CR3).

       

      if(_this._request.responseXML ){      _this._parsingStatus = Sarissa.getParseErrorText(_this._request.responseXML);      if(_this._parsingStatus == Sarissa.PARSED_OK && Sarissa.setXpathNamespaces ){             Sarissa.setXpathNamespaces(_this._request.responseXML,"xmlns='http://www.w3.org/1999/xhtml'");

              }

      }     if(_this.onready){        _this.onready(_this); }                

        • 1. Re: [Exception] TypeError: Object function Sarissa(){} has no method 'getParseErrorText'
          xalperte

          Sorry the script does not appears well...

           

           

          if(_this._request.responseXML ){

            _this._parsingStatus = Sarissa.getParseErrorText(_this._request.responseXML);

            if(_this._parsingStatus == Sarissa.PARSED_OK && Sarissa.setXpathNamespaces ){

               Sarissa.setXpathNamespaces(_this._request.responseXML,"xmlns='http://www.w3.org/1999/xhtml'");       }

            }

          }

          • 2. Re: [Exception] TypeError: Object function Sarissa(){} has no method 'getParseErrorText'
            xalperte

            I made a test and now runs ok but I don't know exactly why....

             

            I defined a ServletFilter in the web.xml in order to return an empty file when the browser ask for the /tdbs-web/faces/rfResorg.ajax4jsf.javascript.AjaxScript resource, then now everything runs ok!

             

            In the header of the page is declared (like informed in the Portlet Bridge documentation) the link to the framework.pack and ui.pack files.

             

            Someone knows why happens that?

            • 3. Re: [Exception] TypeError: Object function Sarissa(){} has no method 'getParseErrorText'
              sojeva

              hi Javier,

              can you show me your servlet filter? Because i've the same problem in this way!

               

              best regards

              getso

              • 4. Re: [Exception] TypeError: Object function Sarissa(){} has no method 'getParseErrorText'
                xalperte

                Hi Get So, apologizes for the delay in my response.

                 

                 

                The logic of this filter is so simple, you only needs to implements the javax.servlet.Filter interface and  leave all the methods implementations empty (init,  doFilter and destroy)

                 

                package com.rudder.commons.ui;

                 

                import java.io.*;

                import java.util.*;

                import javax.servlet.*;

                import javax.servlet.http.*;

                import javax.xml.transform.*;

                import javax.xml.transform.stream.*;

                 

                public class RequestBreakFilter implements Filter {

                 

                    public void init(FilterConfig filterConfig) throws

                            ServletException {

                    }

                 

                    /**

                     * Does nothing. Just breaks the request.

                     * @param servletRequest

                     * @param servletResponse

                     * @param filterChain

                     * @throws java.io.IOException

                     * @throws javax.servlet.ServletException

                     */

                     public void doFilter(javax.servlet.ServletRequest

                            servletRequest, javax.servlet.ServletResponse

                            servletResponse, javax.servlet.FilterChain

                            filterChain)

                            throws java.io.IOException,

                            javax.servlet.ServletException {

                 

                 

                    }

                  

                    public void destroy() {

                    }

                }

                In the web.xml you need to include something like that:

                 

                <filter>

                     <filter-name>RequestBreakFilter</filter-name>

                     <filter-class>com.rudder.commons.ui.RequestBreakFilter</filter-class>

                </filter>

                 

                <filter-mapping>

                     <filter-name>RequestBreakFilter</filter-name>

                     <url-pattern>/faces/rfResorg.ajax4jsf.javascript.AjaxScript</url-pattern>

                </filter-mapping>