9 Replies Latest reply on Dec 16, 2010 2:17 AM by Zwirek Zwirek

    nullorg.ajax4jsf.javascript.AjaxScriptnull

    Zwirek Zwirek Newbie
      Hi!
      I have RichFaces 3.2.2 based application.

      In one of my environments insted of:
      <script type='text/javascript' src='/myapp/a4j/g/3_2_2.SR1org.ajax4jsf.javascript.AjaxScript.seam'></script>

      I have
      <script type='text/javascript' src='nullorg.ajax4jsf.javascript.AjaxScriptnull'>

      Im looking for the reason of that strange behavior.
      Can you explain how RichFaces application generates this content?
      Thanks,
      Zwirek

        • 1. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
          Zwirek Zwirek Newbie

          Hello again!

           

          It was pretty amazing:

          1. I had 11 filters in my web.xml.

          2. After removing any of them everything was fine.

           

          So i merged 2 filters into 1 and my RichFaces stuff works well.

          Have you seen similar, strange behavior?

          My application works on JBoss 4.3.2.

          Best regards,

          Zwirek

          • 2. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
            Nick Belaevski Master

            Hi Zwirek,

             

            Looks like web.xml wasn't parsed correctly - please check its validity against schema.

            • 3. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
              Zwirek Zwirek Newbie

              Hi Nick!

              Thanks for your reply.

              I just checked- my web.xml is valid.

              There must be a different reason...

              Regards,

              Zwirek

              • 4. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
                Nick Belaevski Master

                Ok, can you please post your web.xml?

                • 5. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
                  Zwirek Zwirek Newbie

                  Hi!

                  Here is my web.xml:

                   

                  <?xml version="1.0" encoding="UTF-8"?>

                  <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">

                   

                   

                      <filter>

                          <filter-name>SpyFilter</filter-name>

                          <filter-class>xxx.yyy.web.SpyFilter</filter-class>

                        </filter>

                        <filter-mapping>

                          <filter-name>SpyFilter</filter-name>

                          <url-pattern>/*</url-pattern>

                        </filter-mapping>

                   

                   

                      <filter>

                   

                          <filter-name>encoding-filter</filter-name>

                   

                          <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>

                   

                          <init-param>

                   

                              <param-name>encoding</param-name>

                   

                              <param-value>UTF-8</param-value>

                   

                          </init-param>

                   

                      </filter>

                   

                      <filter-mapping>

                   

                          <filter-name>encoding-filter</filter-name>

                   

                          <url-pattern>/*</url-pattern>

                   

                      </filter-mapping>

                   

                  <filter>

                          <filter-name>CAS Authentication Filter</filter-name>

                          <filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>

                          <init-param>

                              <param-name>casServerLoginUrl</param-name>

                              <param-value>https://xxx.yyy:8943/cas/login</param-value>

                          </init-param>

                          <init-param>

                              <param-name>renew</param-name>

                              <param-value>false</param-value>

                          </init-param>

                          <init-param>

                              <param-name>serverName</param-name>

                              <param-value>https://xxx.yyy</param-value>

                          </init-param>

                      </filter>

                      <filter>

                          <filter-name>CAS Validation Filter</filter-name>

                          <filter-class>org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>

                          <init-param>

                              <param-name>casServerUrlPrefix</param-name>

                              <param-value>https://casprod.xxx.yy:8943/cas</param-value>

                          </init-param>

                          <init-param>

                              <param-name>redirectAfterValidation</param-name>

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

                          </init-param>

                          <init-param>

                              <param-name>useSession</param-name>

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

                          </init-param>

                          <init-param>

                              <param-name>serverName</param-name>

                              <param-value>https://www.yyy</param-value>

                          </init-param>

                      </filter>

                      <filter>

                          <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>

                          <filter-class>org.jasig.cas.client.util.HttpServletRequestWrapperFilter</filter-class>

                      </filter>

                      <filter>

                          <filter-name>CAS Assertion Thread Local Filter</filter-name>

                          <filter-class>org.jasig.cas.client.util.AssertionThreadLocalFilter</filter-class>

                      </filter>

                   

                      <!-- And now, the single sign-out filters -->

                      <filter>

                          <filter-name>CAS Single Sign Out Filter</filter-name>

                          <filter-class>org.jasig.cas.client.session.SingleSignOutFilter</filter-class>

                      </filter>

                   

                   

                      <!-- Filter mappings in the correct order -->

                   

                      <filter-mapping>

                          <filter-name>CAS Single Sign Out Filter</filter-name>

                          <url-pattern>/action/*</url-pattern>

                          <url-pattern>*.seam</url-pattern>

                      </filter-mapping>

                      <filter-mapping>

                          <filter-name>CAS Authentication Filter</filter-name>

                          <url-pattern>/action/*</url-pattern>

                          <url-pattern>*.seam</url-pattern>

                      </filter-mapping>

                      <filter-mapping>

                          <filter-name>CAS Validation Filter</filter-name>

                          <url-pattern>/action/*</url-pattern>

                          <url-pattern>*.seam</url-pattern>

                      </filter-mapping>

                      <filter-mapping>

                          <filter-name>CAS HttpServletRequest Wrapper Filter</filter-name>

                          <url-pattern>/action/*</url-pattern>

                          <url-pattern>*.seam</url-pattern>

                      </filter-mapping>

                      <filter-mapping>

                          <filter-name>CAS Assertion Thread Local Filter</filter-name>

                          <url-pattern>/action/*</url-pattern>

                          <url-pattern>*.seam</url-pattern>

                      </filter-mapping>

                      <listener>

                          <listener-class>org.jasig.cas.client.session.SingleSignOutHttpSessionListener</listener-class>

                      </listener>

                   

                   

                   

                      <filter>

                   

                          <filter-name>StripesFilter</filter-name>

                   

                          <filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>

                   

                          <init-param>

                   

                              <param-name>ActionResolver.Packages</param-name>

                   

                              <param-value>xxx.yyy.view.stripes,xxx.yyy.actions</param-value>

                   

                          </init-param>

                   

                          <init-param>

                              <param-name>Extension.Packages</param-name>

                              <param-value>org.stripesstuff.plugin.session,xxx.yyy.stripes.formatters,xxx.yyy.stripes.converters,net.sourceforge.stripes.integration.spring,xxx.yyy.web.stripes</param-value>

                          </init-param>

                          <init-param>

                              <param-name>TypeConverterFactory.Class</param-name>

                              <param-value>xxx.yyy.web.stripes.SpringTypeConverterFactory</param-value>

                          </init-param>

                          <init-param>

                              <param-name>FormatterFactory.Class</param-name>

                              <param-value>xxx.yyy.web.stripes.FormatterFactory</param-value>

                          </init-param>         <init-param>

                              <param-name>LocalePicker.Locales</param-name>

                              <param-value>pl_PL:UTF-8</param-value>

                          </init-param>

                      </filter>

                   

                      <servlet>

                          <servlet-name>DispatcherServlet</servlet-name>

                          <servlet-class>net.sourceforge.stripes.controller.DispatcherServlet</servlet-class>

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

                      </servlet>

                   

                      <filter-mapping>

                          <filter-name>StripesFilter</filter-name>

                          <servlet-name>DispatcherServlet</servlet-name>

                          <dispatcher>REQUEST</dispatcher>

                          <dispatcher>FORWARD</dispatcher>

                      </filter-mapping>

                      <servlet-mapping>

                          <servlet-name>DispatcherServlet</servlet-name>

                          <url-pattern>/action/*</url-pattern>

                      </servlet-mapping>

                   

                   

                    <filter>

                   

                      <display-name>Ajax4jsf Filter</display-name>

                   

                      <filter-name>ajax4jsf</filter-name>

                   

                      <filter-class>org.ajax4jsf.FastFilter</filter-class>

                   

                      <init-param>

                   

                        <param-name>forceparser</param-name>

                   

                        <param-value>false</param-value>

                   

                      </init-param>

                   

                    </filter>

                   

                    <filter-mapping>

                   

                      <filter-name>ajax4jsf</filter-name>

                   

                      <url-pattern>*.seam</url-pattern>

                   

                      <dispatcher>REQUEST</dispatcher>

                   

                      <dispatcher>FORWARD</dispatcher>

                   

                      <dispatcher>INCLUDE</dispatcher>

                   

                    </filter-mapping>

                   

                    <context-param>

                   

                      <param-name>org.richfaces.SKIN</param-name>

                   

                      <param-value>blueSky</param-value>

                   

                    </context-param>

                   

                    <context-param>

                   

                      <param-name>org.richfaces.LoadStyleStrategy</param-name>

                   

                      <param-value>NONE</param-value>

                   

                    </context-param>

                   

                    <listener>

                   

                      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>

                   

                    </listener>

                   

                    <listener>

                   

                      <listener-class>

                   

                              org.springframework.web.context.request.RequestContextListener</listener-class>

                   

                    </listener>

                   

                    <filter>

                      <filter-name>SessionExpiredFilter</filter-name>

                      <filter-class>xxx.yyy.infrastructure.auth.SessionExpiredFilter</filter-class>

                    </filter>

                    <filter-mapping>

                      <filter-name>SessionExpiredFilter</filter-name>

                      <url-pattern>/action/*</url-pattern>

                      <url-pattern>*.seam</url-pattern>

                    </filter-mapping>

                   

                    <!-- here was my additional filter -->

                   

                    <filter>

                      <filter-name>Seam Filter</filter-name>

                      <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>

                    </filter>

                    <filter-mapping>

                      <filter-name>Seam Filter</filter-name>

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

                    </filter-mapping>

                    <filter>

                      <filter-name>Seam Multipart Filter</filter-name>

                      <filter-class>org.jboss.seam.web.MultipartFilter</filter-class>

                    </filter>

                    <filter-mapping>

                      <filter-name>Seam Multipart Filter</filter-name>

                      <url-pattern>*.seam</url-pattern>

                    </filter-mapping>

                    <servlet>

                      <servlet-name>Seam Resource Servlet</servlet-name>

                      <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>

                    </servlet>

                    <servlet-mapping>

                      <servlet-name>Seam Resource Servlet</servlet-name>

                      <url-pattern>/seam/resource/*</url-pattern>

                    </servlet-mapping>

                    <context-param>

                      <param-name>facelets.DEVELOPMENT</param-name>

                      <param-value>false</param-value>

                    </context-param>

                    <context-param>

                      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>

                      <param-value>.xhtml</param-value>

                    </context-param>

                    <servlet>

                      <servlet-name>Faces Servlet</servlet-name>

                      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

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

                    </servlet>

                    <servlet-mapping>

                      <servlet-name>Faces Servlet</servlet-name>

                      <url-pattern>*.seam</url-pattern>

                    </servlet-mapping>

                    <security-constraint>

                      <display-name>Restrict raw XHTML Documents</display-name>

                      <web-resource-collection>

                        <web-resource-name>XHTML</web-resource-name>

                        <url-pattern>*.xhtml</url-pattern>

                      </web-resource-collection>

                      <auth-constraint/>

                    </security-constraint>

                    <session-config>

                      <session-timeout>1</session-timeout>

                    </session-config>

                    <context-param>

                      <param-name>contextConfigLocation</param-name>

                      <param-value>/WEB-INF/applicationContext.xml</param-value>

                    </context-param>

                    <listener>

                      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>

                    </listener>

                    <context-param>

                      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

                      <param-value>server</param-value>

                    </context-param>

                    <context-param>

                      <param-name>facelets.BUFFER_SIZE</param-name>

                      <param-value>500000</param-value>

                    </context-param>

                    <context-param>

                      <param-name>com.sun.faces.responseBufferSize</param-name>

                      <param-value>500000</param-value>

                    </context-param>

                    <servlet>

                      <servlet-name>ImageServlet</servlet-name>

                      <servlet-class>net.sf.jasperreports.j2ee.servlets.ImageServlet</servlet-class>

                    </servlet>

                    <servlet-mapping>

                      <servlet-name>ImageServlet</servlet-name>

                      <url-pattern>/image</url-pattern>

                    </servlet-mapping>

                    <servlet>

                      <servlet-name>JasperPdfServlet</servlet-name>

                      <servlet-class>net.sf.jasperreports.j2ee.servlets.PdfServlet</servlet-class>

                    </servlet>

                    <servlet-mapping>

                      <servlet-name>JasperPdfServlet</servlet-name>

                      <url-pattern>/jasperpdf.seam</url-pattern>

                    </servlet-mapping>

                    <servlet>

                      <servlet-name>JExcelApiServlet</servlet-name>

                      <servlet-class>net.sf.jasperreports.j2ee.servlets.JExcelApiServlet</servlet-class>

                    </servlet>

                    <servlet-mapping>

                      <servlet-name>JExcelApiServlet</servlet-name>

                      <url-pattern>/jasperxls.seam</url-pattern>

                    </servlet-mapping>

                    <servlet>

                      <servlet-name>SlideViewServlet</servlet-name>

                      <servlet-class>xxx.yyy.SlideViewServlet</servlet-class>

                    </servlet>

                    <servlet-mapping>

                      <servlet-name>SlideViewServlet</servlet-name>

                      <url-pattern>/slideView.seam</url-pattern>

                    </servlet-mapping>

                    <servlet>

                      <description>report data</description>

                      <display-name>MsordDataServlet</display-name>

                      <servlet-name>MsordDataServlet</servlet-name>

                      <servlet-class>xxx.yyy.ReportServlet</servlet-class>

                    </servlet>

                    <servlet-mapping>

                      <servlet-name>MsordDataServlet</servlet-name>

                      <url-pattern>/MsordDataServlet</url-pattern>

                    </servlet-mapping>

                   

                   

                    <context-param>

                   

                      <param-name>facelets.LIBRARIES</param-name>

                   

                      <param-value>/WEB-INF/xf.taglib.xml</param-value>

                   

                    </context-param>

                   

                    <servlet>

                      <servlet-name>jaxws-servlet</servlet-name>

                      <servlet-class>

                         com.sun.xml.ws.transport.http.servlet.WSSpringServlet

                      </servlet-class>

                  </servlet>

                   

                  <servlet-mapping>

                      <servlet-name>jaxws-servlet</servlet-name>

                      <url-pattern>/services/*</url-pattern>

                  </servlet-mapping>

                   

                    <error-page>

                        <error-code>401</error-code>

                       <location>/errorLogin.jsp</location>

                    </error-page>

                  </web-app>

                  • 6. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
                    Nick Belaevski Master

                    Zwirek,

                     

                    I've checked old forum threads - it's said that duplicate url-pattern inside servlet/filter mapping can cause such behavior. Can you please try removing them and check?

                    • 7. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
                      Zwirek Zwirek Newbie

                      Nick,

                      I've replaced lines like:

                      <url-pattern>/action/*</url-pattern>
                      <url-pattern>*.seam</url-pattern>

                       

                      with

                      <url-pattern>*.seam</url-pattern>

                       

                      It still doesn't work. :-(

                       

                      Zwirek

                      • 8. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
                        Nick Belaevski Master

                        The same problem in this thread: http://community.jboss.org/thread/160013?tstart=0 . Can you please try with the latest RF version?

                        • 9. Re: nullorg.ajax4jsf.javascript.AjaxScriptnull
                          Zwirek Zwirek Newbie

                          Hi!

                          I can't try it at the moment, but i add it to my further research.

                          Regards,

                          Zwirek