5 Replies Latest reply on Nov 4, 2014 5:51 AM by Michal Petrov

    Missing image resources on RF 4.5.0.CR2

    Franck Gasparotto Newbie

      Hello,

       

      I've got theses 404 error messages since i've migrated to 4.5.0 CR2 :

       

      org.richfaces.resources/rfRes/menu_list_bg.png?v=4.5.0.CR1&db=eAFjZBBjZGBmZBBh!P!myz!G!8fu!WdkAgA4Nge1&ln=org.richfaces.images

      org.richfaces.resources/rfRes/menuNodeImage.png?v=4.5.0.CR1&db=eAH737v9838GBgYAGOAENg__&ln=org.richfaces.images

      org.richfaces.resources/rfRes/calendarSeparator.png?v=4.5.0.CR1&db=eAH7z8DAAAAEAAEA&ln=org.richfaces.images


        • 1. Re: Missing image resources on RF 4.5.0.CR2
          Franck Gasparotto Newbie

          I found where it came from : the css cache of mozilla.

          It strangely keeps references to old images whose adress contains "4.5.0.CR1" which obviously doesn't exist anymore.

          Don't forget to clear the cache by CTRL + F5 after migrating the RF jars !

          • 2. Re: Missing image resources on RF 4.5.0.CR2
            Michal Petrov Master

            Hi,

             

            those URIs you list contain v=4.5.0.CR1, have you tried clearing your cache?

             

            EDIT: Ah, ok. It was the cache

            • 3. Re: Re: Missing image resources on RF 4.5.0.CR2
              Franck Gasparotto Newbie

              Hello,

              When switching the value of  javax.faces.PROJECT_STAGE from Development to Production in the web.xml, all Richfaces images are missing

              For instance :

               

              NetworkError: 500 Erreur Interne de Servlet - http://localhost:8080/myApp/org.richfaces.resources/rfRes/inputBackgroundImage.png?v=4.5.0.CR2&db=eAFjZL!AyMDN-P8!4!83X!4B6f!!GZgAYpAKwQ__&ln=org.richfaces.images


              And i have got this java error :



              java.lang.NoSuchMethodError: net.sf.ehcache.Element.<init>(Ljava/lang/Object;Ljava/lang/Object;II)V
                  at org.richfaces.cache.EhCacheCache.put(EhCacheCache.java:73)
                  at org.richfaces.application.CacheProvider.put(CacheProvider.java:66)
                  at org.richfaces.resource.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:143)
                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:190)
                  at org.richfaces.webapp.ResourceServlet.httpService(ResourceServlet.java:129)
                  at org.richfaces.webapp.ResourceServlet.service(ResourceServlet.java:123)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
                  at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
                  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
                  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
                  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
                  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
                  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
                  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
                  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
                  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
                  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
                  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
                  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
                  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
                  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
                  at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
                  at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
                  at java.lang.Thread.run(Unknown Source)
              

               

              What might the cause please ?

              • 4. Re: Missing image resources on RF 4.5.0.CR2
                Franck Gasparotto Newbie

                Adding the ehcache-2.8.3.jar to the project solve the exception. It occurs with the final version too.

                But it seems weird that this error occurs only in Production mode and as far as i know ehcache is not a required lib for rifchfaces or it might have changed with the new version, did it ?

                • 5. Re: Missing image resources on RF 4.5.0.CR2
                  Michal Petrov Master

                  Caching is turned off in Development mode. You're right that you shouldn't need EHCache, but you'll probably need some cache implementation (or turn off caching), I'll look into it. The cache dependencies are available in the richfaces-cache-bom.