Description of problem: Adding following snippet to components.xml does not work as expected: <inter:locale-config default-locale="cs" supported-locales="en cs"/> And it produces following message in server log after application deployment: "SEVERE [javax.faces] (MSC service thread 1-2) Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup." Steps to Reproduce: 1. You can alter booking example to use more messages bundles. 2. Create copy of messages.properties named e.g messages_cs.properties 3. Rename original messages.properties to messages_en.properties 4. Add mentioned snippet to components.xml 5. Build app and deploy (don't forget to check you browser language settings, I used FF) If you check class org.jboss.seam.international.LocaleConfig.java and its initLocaleConfig() method, then you'll notice that application variable resolves always to null in this case, therefore the locales are never set correctly. Workaround: Add com.sun.faces.config.ConfigureListener to web.xml before org.jboss.seam.servlet.SeamListener. You can see https://issues.jboss.org/browse/JBSEAM-4401
Doc text updated.
This isn't just the case of testsuite or test. This is the case of every Seam application using localization configuration in components.xml. Hence the doc text should be changed e.g to: "When locale-config configuration is used in the Seam application, the following error message is shown in the server container log: SEVERE [javax.faces] (MSC service thread 1-2) Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup. As a consequence, locale-config configuration is not taken into account in the application. This issue can be worked around by using the com.sun.faces.config.ConfigureListener configuration in the application's web.xml file. As a result of the workaround, the locale configuration works as expected."
Edited release note and inserted it into the 2.2.0 RN book. Docs stage URL: https://documentation-devel.engineering.redhat.com/docs/en-US/JBoss_Web_Framework_Kit/2.2/html-single/2.2.0_Release_Notes/index.html Build: JBoss_Web_Framework_Kit-2.2.0_Release_Notes-2.2-en-US-0-23
Real issue here is the order of Mojarra initialization in WAR. Everytime you see the following error message "SEVERE [javax.faces] (MSC service thread 1-2) Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup." you are experiencing different order of applicaiton initialization than Seam and your web application will expect. If correct order is processed you couldn't see that error at all. Correct order is when Mojarra is initialized before Seam is processing configuration. The only working way now is to specify com.sun.faces.config.ConfigureListener in web.xml before org.jboss.seam.servlet.SeamListener configuration to strictly get such order AFAIK.
Marek Novotny <mnovotny> updated the status of jira JBSEAM-5086 to Closed
Marek Novotny <mnovotny> made a comment on jira JBSEAM-5086 I marked it as Deferred, because order of WAR initialization is not in Seam full competences, but rather application or container competences. The scanning order of WAR from application point of view can be managed only in web.xml. Loading of the listener _com.sun.faces.config.ConfigureListener_ is done from existence of the Tag Library Definition in WAR or from the _javax.servlet.ServletContainerInitializer_. Adding _com.sun.faces.config.ConfigureListener_ before _org.jboss.seam.SeamListener_ is just emphasing that we need to have initialized Mojarra before we do Seam initialization, because there are Seam components which rely on initialized JSF environment.