5 Replies Latest reply on Oct 13, 2012 3:12 PM by jpadula35

    [RF4.3.0.M1 or 4.2.2.Final] Unable to find or serve resource, menu_item_bg.gif.png, from library, org.richfaces.images.

    jpadula35

      Hi,

      RF4.3.0.M1

      GateIn 3.4.0.Final

      Mojarra 2.1.13

      PortletBridge 3.0.1.Beta2 (or 3.0.1.Beta1)

      Guava 11.0.2

      SAC 1.3

      CSSParser 0.9.5

      Spring 3.1.12

       

      I upgraded from RichFaces4.2.2.Final to RichFaces 4.3.0.M1 last week, and now I am seeing about 8 of these warnings, every now and then.

       

       

      2012-10-08 22:27:14,675 WARNING [javax.enterprise.resource.webcontainer.jsf.application] (http-0.0.0.0-8180-38) JSF1064: Unable to find or serve resource, menu_item_bg.gif.png, from library, org.richfaces.images.

       

      I was wondering if I am missing anything or how to fix these (or if these warnings effect anything).

       

      Here is my web.xml:

       

       

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

      <web-app id="WebApp_ID" version="2.5"

                xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

       

       

      <display-name>Portlet_AthenaAdministrationPortlet</display-name>

       

                <context-param>

                          <param-name>javax.portlet.faces.RENDER_POLICY</param-name>

                          <param-value>ALWAYS_DELEGATE</param-value>

                </context-param>

       

       

                <context-param>

                          <param-name>org.ajax4jsf.RESOURCE_URI_PREFIX</param-name>

                          <param-value>rfRes</param-value>

                </context-param>

       

       

                <context-param>

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

                          <param-value>#{skinBean.skin}</param-value>

                </context-param>

       

                <context-param>

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

                          <param-value>ALL</param-value>

                </context-param>

       

       

                <context-param>

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

                          <param-value>ALL</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>javax.faces.DEFAULT_SUFFIX</param-name>

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

                </context-param>

       

       

                <context-param>

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

                          <param-value>Development</param-value>

                </context-param>

       

       

                <context-param>

                          <param-name>org.richfaces.resourceOptimization.enabled</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>

       

       

                <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>/faces/*</url-pattern>

                </servlet-mapping>

       

       

                <!-- Spring Configuration -->

                <context-param>

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

                          <param-value>/WEB-INF/spring-beans.xml</param-value>

                </context-param>

                <listener>

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

                </listener>

                <listener>

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

                </listener>

       

                <context-param>

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

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

                </context-param>

                <context-param>

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

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

                </context-param>

                <context-param>

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

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

                </context-param>

       

                <context-param>

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

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

                </context-param>

       

       

                <context-param>

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

                          <param-value>com.raytheon.athena.portlet.common.CustomResourceResolver</param-value>

                </context-param>

       

                <!-- Use bundled JSF in war, rather than what is packaged with JBossAS6 -->

                <context-param>

                    <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

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

                  </context-param>

      </web-app>

       

      --Thanks for your help.

        • 1. Re: [RF4.3.0.M1 or 4.2.2.Final] Unable to find or serve resource, menu_item_bg.gif.png, from library, org.richfaces.images.
          jpadula35

          Actually, I just went back to RichFaces 4.2.2.Final and am getting the same warnings. I'm not sure why I didn't get them last week, I think it might be because I updated some lines in the web.xml the other day, notably this section I added:

           

          <context-param>

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

                              <param-value>#{skinBean.skin}</param-value>

          </context-param>

           

          I thought this would fix some other exceptions I was seeing, but I guess it caused some new problems.

          • 2. Re: [RF4.3.0.M1 or 4.2.2.Final] Unable to find or serve resource, menu_item_bg.gif.png, from library, org.richfaces.images.
            jpadula35

            Some more details, as I am still having the warnings. I have all the following RichFaces 4.2.2 jars in my war file.

            richfaces-components-api-4.2.2.Final.jar

            richfaces-components-ui-4.2.2.Final.jar

            richfaces-core-api-4.2.2.Final.jar

            richfaces-core-impl-4.2.2.Final.jar

             

            I have added this to web.xml:

             

            <servlet>

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

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

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

            </servlet>

             

            <servlet-mapping>

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

                 <url-pattern>/org.richfaces.resources/*</url-pattern>

            </servlet-mapping>

             

            Removed this:

             

            <context-param>

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

                                <param-value>#{skinBean.skin}</param-value>

            </context-param>

             

             

            Any help would be much appreciated.

            • 3. Re: [RF4.3.0.M1 or 4.2.2.Final] Unable to find or serve resource, menu_item_bg.gif.png, from library, org.richfaces.images.
              jhuska

              Hi Joseph,

               

              I do not know right now what can be the cause but I would recommend you to follow the web.xml from the showcase, which can be found here:

              https://github.com/richfaces/showcase/blob/develop/src/main/webapp-jbas71/WEB-INF/web.xml

               

              It is for JBOss AS 7.1, ignore the push section. Should you look at the same URL web.xml files for other containers.

               

              Let us know whether the problem disappeared.

               

              Regards,

              Juraj

              1 of 1 people found this helpful
              • 4. Re: [RF4.3.0.M1 or 4.2.2.Final] Unable to find or serve resource, menu_item_bg.gif.png, from library, org.richfaces.images.
                jpadula35

                Thanks for the suggestion Juraj. I didn't mention we are using GateIn3.4.0.Final_jbossas6, so I am assuming I should use the sample from the j2ee folder?

                https://github.com/richfaces/showcase/blob/develop/src/main/webapp-jee6/WEB-INF/web.xml

                 

                 

                Question though, looks like there are a couple of variables in the settings. Do I have to set these somewhere?

                #{skinBean.skin}

                 

                ${javax.faces.PROJECT_STAGE}

                 

                I had previously see the PROJECT_STAGE to Development.

                 

                So I should leave these the way they are in the sample?

                <context-param>

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

                        <param-value>#{skinBean.skin}</param-value>

                </context-param>

                 

                When I added this section, got warning (see below):

                <context-param>

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

                        <param-value>${javax.faces.PROJECT_STAGE}</param-value>

                </context-param>

                2012-10-12 10:45:56,564 INFO  [javax.enterprise.resource.webcontainer.jsf.application] (HDScanner) Unable to discern ProjectStage for value ${javax.faces.PROJECT_STAGE}.

                 

                 

                And I should keep this section also?

                <!-- Force this Servlet to use one Thread per connection

                         instead of native API as workaround for (RF-11064)  -->

                    <context-param>

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

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

                    </context-param>

                 


                Regards,

                Joe

                 

                Message was edited by: Joseph Padula - added question on org.atmosphere.useBlocking

                • 5. Re: [RF4.3.0.M1 or 4.2.2.Final] Unable to find or serve resource, menu_item_bg.gif.png, from library, org.richfaces.images.
                  jpadula35

                  The warnings only started showing up when I added the javax.faces.PROJECT_STAGE Development parameters. That is why they just started appearing. If I remove that or change to Production they do not appear.

                   

                  But I upgraded to RichFaces 4.2.3.CR1 and the warnings no longer appear, even with javax.faces.PROJECT_STAGE set to Development.