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

        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" );
        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.
        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);

          People

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

            Dates

            • Created:
              Updated:
              Resolved: