myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Marinschek (JIRA)" <>
Subject [jira] Resolved: (MYFACES-1812) All faces-config.xml get loaded twice from jars in WEB-INF/lib
Date Wed, 30 Jan 2008 23:25:34 GMT


Martin Marinschek resolved MYFACES-1812.

       Resolution: Fixed
    Fix Version/s: 1.2.3-SNAPSHOT

P.S.: can you please test the new snapshot tomorrow and tell us the results?



> All faces-config.xml get loaded twice from jars in WEB-INF/lib
> --------------------------------------------------------------
>                 Key: MYFACES-1812
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>            Reporter: Val Blant
>            Assignee: Martin Marinschek
>             Fix For: 1.2.3-SNAPSHOT
> "ClassUtils.getResources(FACES_CONFIG_RESOURCE, this)" will return an iterator over all
"META-INF/faces-config.xml" resources that were found. The search is carried out by starting
at WebAppClassLoader and making an Enumeration of all resources with the given name that WebAppClassLoader
and all its parents see. The jars placed into WEB-INF/lib will be seen by the WebAppClassLoader
AND AppClassLoader, thus resulting in the same jars (the ones that have "META-INF/faces-config.xml")
being placed on the list twice. 
> This is fine, but things break when FacesConfigurator.feedClassloaderConfigurations()
does not check for duplicate URLs and just blindly registers everything from these jars twice.

> One of the effects of this bug is that all phase listeners get registered and therefore
executed twice.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message