-
1. Re: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
jamezp May 17, 2017 8:21 PM (in response to chupacabras)I'm not certain this is the issue, but maybe try removing the com.sun.jsf-impl module. You should only need the javax.faces.api.
--
James R. Perkins
-
2. Re: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
chupacabras May 18, 2017 3:50 AM (in response to jamezp)I have removed "com.sun.jsf-impl" dependency from Richfaces module.
It did not help.
I still receive tons of this line:
2017-05-18 09:42:17,666 WARNING [javax.faces] (default task-124) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match. 2017-05-18 09:42:17,666 WARNING [javax.faces] (default task-3) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match. 2017-05-18 09:42:17,666 WARNING [javax.faces] (default task-126) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match. 2017-05-18 09:42:17,666 WARNING [javax.faces] (default task-122) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match. 2017-05-18 09:42:17,666 WARNING [javax.faces] (default task-128) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match. 2017-05-18 09:42:17,666 WARNING [javax.faces] (default task-118) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match. 2017-05-18 09:42:17,682 WARNING [javax.faces] (default task-1) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match. 2017-05-18 09:42:17,682 WARNING [javax.faces] (default task-5) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match. 2017-05-18 09:42:17,682 WARNING [javax.faces] (default task-127) Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
It is being generated by this code:
FacesContextFactory contextFactory=(FacesContextFactory) FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY); LifecycleFactory lifecycleFactory=(LifecycleFactory) FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY); Lifecycle lifecycle=lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
Every line throws that warning to the log.
-
3. Re: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
jamezp May 18, 2017 11:03 AM (in response to chupacabras)The only thing I can think of would be to double check your deployment to ensure there are no JSF libraries in your deployment. I'm not sure why else it would see multiple implementations on the class path.
--
James R. Perkins
-
4. Re: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
chupacabras May 18, 2017 12:03 PM (in response to jamezp)I see two options:
1. I have multiple JSF implementations in my classpath
2. there is some bug in WildFly (or somewhere else)
I checked it, I have no JSF implementation inside my WAR files. WildFly has Mojarra module (com.sun.jsf-impl), and I added Richfaces module (as described in my original post, removed "com.sun.jsf-impl" from dependencies in Richfaces).
My WAR application has dependency for Richfaces, not Mojarra.
Is there a way how to verify whether there are multiple JSF implementations on the class path?
-
5. Re: Multiple JSF Applications found on same ClassLoader. Unable to safely determine which FactoryManager instance to use. Defaulting to first match.
jamezp May 20, 2017 11:21 PM (in response to chupacabras)I'm not sure what it could be. Maybe if you look at the class path with JConsole or a profiler of some sort. You could turn on trace logging for org.jboss.modules, but it will be very verbose.
--
James R. Perkins