5 Replies Latest reply on Sep 28, 2007 3:46 PM by sergeysmirnov

    Resources framework is not initialised....

    zacwolfe

      I've working on getting RichFaces 3.1.0 working with Websphere 5.1, jsp 1.2, servlet 2.3, JDK 1.4. Intermittently I'm seeing this error:

      Resources framework is not initialised, check web.xml for Filter configuration

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
      <web-app id="WebApp_ID">
       <display-name>RichFacesTestDND</display-name>
      
       <context-param>
       <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <context-param>
       <param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
       <param-value>true</param-value>
       </context-param>
       <context-param>
       <param-name>org.apache.myfaces.PRETTY_HTML</param-name>
       <param-value>true</param-value>
       </context-param>
      
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
       <param-value>false</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>blueSky</param-value>
       </context-param>
      
      
       <filter>
       <filter-name>ajax4jsf</filter-name>
       <display-name>Ajax4jsf Filter</display-name>
       <description></description>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       <init-param>
       <param-name>forceparser</param-name>
       <param-value>false</param-value>
       </init-param>
       </filter>
      
      
       <filter-mapping>
       <filter-name>ajax4jsf</filter-name>
       <servlet-name>FacesServlet</servlet-name>
       </filter-mapping>
      
       <servlet>
       <servlet-name>FacesServlet</servlet-name>
       <display-name>FacesServlet</display-name>
       <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
       <load-on-startup>1</load-on-startup>
       </servlet>
       <servlet-mapping>
       <servlet-name>FacesServlet</servlet-name>
       <url-pattern>/faces/*</url-pattern>
       </servlet-mapping>
       <servlet-mapping>
       <servlet-name>FacesServlet</servlet-name>
       <url-pattern>*.jsf</url-pattern>
       </servlet-mapping>
      
      
       <welcome-file-list>
       <welcome-file>index.html</welcome-file>
       <welcome-file>index.htm</welcome-file>
       <welcome-file>index.jsp</welcome-file>
       <welcome-file>default.html</welcome-file>
       <welcome-file>default.htm</welcome-file>
       <welcome-file>default.jsp</welcome-file>
      
       </welcome-file-list>
      </web-app>
      
      


      Any ideas? Thanks

        • 1. Re: Resources framework is not initialised....
          zacwolfe

          This is strange. The first time I access the page I get the "Resources framework is not initialised..." error. If I hit refresh a few times eventually the error goes away and the page displays correctly.

          If anyone has any ideas I'd deeply appreciate any help on this. This is my first time using RichFaces and if it works, I'm hoping to introduce it company-wide.

          Again, i'm using:

          JDK 1.4.2
          RichFaces 3.1.0
          Websphere 5.1
          Servlet 2.3
          JSP 1.2

          • 2. Re: Resources framework is not initialised....
            zacwolfe

            ok I have a workaround. I was using a jsp page to forward to my jsf page and for some reason it was causing the problem:

            <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
            
            <html>
            
            <head></head>
            
             <body>
            
             <jsp:forward page="/pages/datatablescroller.jsf" />
            
             </body>
            
            </html>
            


            If move the page to the parent directory and access the page directly
            (i.e. http://localhost:9081/RichFacesTestDND/datatablescroller.jsf) it works!

            Still, I'd like to know what is going on here since that code should work.


            • 3. Re: Resources framework is not initialised....

              try to use url-pattern instead of reference to faces servlet for the ajax4jsf filter mapping. Try to use /* for example there

              • 4. Re: Resources framework is not initialised....
                zacwolfe

                Thanks for the reply Sergey.

                I tried using url-pattern instead but got the same result. I've also tried my example with both straight JSF and Facelets and found no difference: I always get the "Resources framework is not initialised" error when using a jsp:forward tag.

                • 5. Re: Resources framework is not initialised....

                  As you can see in the dev guide (http://tinyurl.com/2fce4z), it is recommended to use for the filter mapping:

                  <dispatcher>REQUEST</dispatcher>
                  <dispatcher>FORWARD</dispatcher>
                  <dispatcher>INCLUDE</dispatcher>
                  


                  All requests from the RichFaces page should pass the filter. Filter does a lot of things. Bypassing filter automatically causes the problems you have on your side.
                  The FORWARD dispatcher exactly serve the cases with forwarding like the one you show.

                  However, as best as know, the Servet 2.3 does not support dispatchers yet. So, you need to figure out how to live this it. I.e. how avoid bypassing the filter.



                  Ok. This is a limitation of Servlet 2.3.