javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2029

Annoying and incorrect complaints about multiple applications

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.1.2, 2.2.0-m01
    • Component/s: None
    • Labels:
      None

      Description

      Due to a patch introduced for fixing GLASSFISH-15809 we currently now face the issue that almost everything that calls something like 'FactoryFinder.getFactory(...)' results in the following warning in the logs:

      Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.

      This warning, however, is not correct as the warning also appears if only one instance has been found and the code does not consider the first as the warning says, but the very last it has found inside the factoryMap. This can be easily reproduced by creating a web application with the prettyfaces library, as they introduce a ServletRequestListener that always asks for the current JSF application, which triggers this warning at almost every request and therefore flooding the logs heavily.

      Therefore I've made a simple patch (multiple-factory-manager.patch - against trunk) to fix this issue and to bring the code in sync with the message.

        Activity

        Hide
        Ed Burns added a comment -

        Thanks. This patch looks fine. I have applied it and am running the automated test suite. If all clears, I'll commit.

        Show
        Ed Burns added a comment - Thanks. This patch looks fine. I have applied it and am running the automated test suite. If all clears, I'll commit.
        Hide
        Ed Burns added a comment -

        Sending jsf-api/src/main/java/javax/faces/FactoryFinder.java
        Transmitting file data .
        Committed revision 8988.

        Committed on trunk

        Show
        Ed Burns added a comment - Sending jsf-api/src/main/java/javax/faces/FactoryFinder.java Transmitting file data . Committed revision 8988. Committed on trunk
        Hide
        Ed Burns added a comment -

        Committed on 2.1 branch

        Sending jsf-api/src/main/java/javax/faces/FactoryFinder.java
        Transmitting file data .
        Committed revision 8989.

        Show
        Ed Burns added a comment - Committed on 2.1 branch Sending jsf-api/src/main/java/javax/faces/FactoryFinder.java Transmitting file data . Committed revision 8989.

          People

          • Assignee:
            Ed Burns
            Reporter:
            ancoron
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: