ICEfaces
  1. ICEfaces
  2. ICE-9168

Mojarra logs mime-type and missing resource WARNINGS for certain dynamic resources

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.3
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces Mojarra

      Description

      The latest versions of Mojarra (since 2.1.18 approx) log the following WARNINGS when running with ICEfaces. The logging is different depending on the mode that Mojarra is in. In Development, both the mime-type and missing resource WARNINGS are fired. In Production, just the mime-type WARNINGS are logged.

      Development mode:

      Apr 12, 2013 11:56:35 AM com.sun.faces.context.ExternalContextImpl getMimeType
      WARNING: JSF1091: No mime type could be found for file TestScript. To resolve this, add a mime-type mapping to the applications web.xml.
      Apr 12, 2013 11:56:35 AM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource
      WARNING: JSF1064: Unable to find or serve resource, TestScript.
      Apr 12, 2013 11:56:35 AM com.sun.faces.context.ExternalContextImpl getMimeType
      WARNING: JSF1091: No mime type could be found for file CoreCSSOutput. To resolve this, add a mime-type mapping to the applications web.xml.
      Apr 12, 2013 11:56:35 AM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource
      WARNING: JSF1064: Unable to find or serve resource, CoreCSSOutput.

      Production mode:

      Apr 12, 2013 11:59:02 AM com.sun.faces.context.ExternalContextImpl getMimeType
      WARNING: JSF1091: No mime type could be found for file TestScript. To resolve this, add a mime-type mapping to the applications web.xml.
      Apr 12, 2013 11:59:02 AM com.sun.faces.context.ExternalContextImpl getMimeType
      WARNING: JSF1091: No mime type could be found for file CoreCSSOutput. To resolve this, add a mime-type mapping to the applications web.xml.

        Activity

        Deryk Sinotte created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34386 Fri Apr 12 13:08:07 MDT 2013 deryk.sinotte ICE-9168: add an extension to the resource name and a custom type that can be checked to avoid resource creation to avoid Mojarra logging warnings
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/CoalescingResource.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/CoalescingResourceHandler.java
        Hide
        Deryk Sinotte added a comment -

        I added extensions to the resource names to avoid the mime-type warnings:

        getAttributes().put("name", "TestScript.js");
        getAttributes().put("name", "CoreCSSOutput.css");

        And I added a custom attribute that can be checked during resource coalescing to avoid having createResource called for these dynamic resources.

        getAttributes().put("ice.type", "dynamic");
        Show
        Deryk Sinotte added a comment - I added extensions to the resource names to avoid the mime-type warnings: getAttributes().put( "name" , "TestScript.js" ); getAttributes().put( "name" , "CoreCSSOutput.css" ); And I added a custom attribute that can be checked during resource coalescing to avoid having createResource called for these dynamic resources. getAttributes().put( "ice.type" , "dynamic" );
        Deryk Sinotte made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Resolution Fixed [ 1 ]
        Hide
        Deryk Sinotte added a comment -

        The resources in question (TestScript, CoreCSSOutput) are both dynamic resources that are added to the <head> programmatically as UIOutputWriter components within the BridgeSetup event listener code.

        During the CoalescingResourceHandler.replaceResource method, an attempt is made to use the ResourceHandler to createResources for these dynamic components.

        1) The mime-type warnings are caused because the name of the resources do not have an extension which causes Mojarra to be unable to determine it's type.

        2) The missing resource warning is caused because these resources do not exist on the file system.

        Show
        Deryk Sinotte added a comment - The resources in question (TestScript, CoreCSSOutput) are both dynamic resources that are added to the <head> programmatically as UIOutputWriter components within the BridgeSetup event listener code. During the CoalescingResourceHandler.replaceResource method, an attempt is made to use the ResourceHandler to createResources for these dynamic components. 1) The mime-type warnings are caused because the name of the resources do not have an extension which causes Mojarra to be unable to determine it's type. 2) The missing resource warning is caused because these resources do not exist on the file system.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34391 Fri Apr 12 14:57:03 MDT 2013 ken.fyten ICE-9168: add an extension to the resource name and a custom type that can be checked to avoid resource creation to avoid Mojarra logging warnings
        Files Changed
        Commit graph MODIFY /icefaces3/tags/icefaces-3.3.0/icefaces/core/src/main/java/org/icefaces/impl/event/BridgeSetup.java
        Commit graph MODIFY /icefaces3/tags/icefaces-3.3.0/icefaces/core/src/main/java/org/icefaces/impl/application/CoalescingResource.java
        Commit graph MODIFY /icefaces3/tags/icefaces-3.3.0/icefaces/core/src/main/java/org/icefaces/impl/application/CoalescingResourceHandler.java
        Ken Fyten made changes -
        Affects Version/s 3.2 [ 10338 ]
        Affects Version/s 3.3 [ 10370 ]
        Markus Guenther made changes -
        Comment [ This warning message as well is raised if there are any URL parameters used ...

        Simply got rid of them by adding the following to the logging.properties of Tomcat:
        {code}
        ## inhibit JSF1091 warning message
        com.sun.faces.context.ExternalContextImpl=SEVERE
        {code} ]
        Hide
        Markus Guenther added a comment -

        This warning is as well given on many other situations, eg. if you have url parameters. The only way I found to get rid of it was to set the log level:

                FacesLogger.CONTEXT.getLogger().setLevel(java.util.logging.Level.SEVERE);
        
        Show
        Markus Guenther added a comment - This warning is as well given on many other situations, eg. if you have url parameters. The only way I found to get rid of it was to set the log level: FacesLogger.CONTEXT.getLogger().setLevel(java.util.logging.Level.SEVERE);
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: