Using JSF impl from JBoss 4.2.2.GA in 5.1.0.GA
aogier Jan 20, 2011 9:58 AMHi,
I'm trying to migrate a Seam 2.2.0.GA application from JBoss 4.2.2.GA to 5.1.0.GA.
The problem is that in 5.1.0.GA, the application has strange behaviors with JSF.
I've seen that in 4.2.2.GA, jsf-impl is version 1.2_04-p02 and in 5.1.0.GA it's version 1.2_12.
So I'm trying to use specific 1.2_04-p02 of jsf-libs into my war (the application is bundled in an ear).
I've googled for a long time then I found that my solution could be to add
{code:xml}
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
{code}
in web.xml and bundle the jsf-impl-1.2_04-p02.jar in the war (so in WEB-INF/lib).
After that, and even if I added the jsf-impl.jar in /lib of the ear, I had that Exception :
{code}
java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:725)
{code}
(Full stack here : [http://www.copypastecode.com/62278/])
Same Exception if I put the 3 jars in WEB-INF/jsf-libs, and this with or without WEB-INF/jboss-web.xml
{code:xml}
<class-loading java2ClassLoadingCompliance="false">
<loader-repository>
seam.jboss.org:loader=myWebapp
<loader-repository-config>java2ParentDelegation=false</loader-repository-config>
</loader-repository>
</class-loading>
{code}
I also tried to replace directly the jars of deploy/jboss-web.deployer/jsf-libs with those found in 4.2.2.GA, but then I had an error when starting JBoss :
{code}
15:51:15,907 FATAL [application] JSF1030: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider' cannot be loaded.
15:51:15,908 INFO [application] JSF1048: PostConstruct/PreDestroy annotations present. ManagedBeans methods marked with these annotations will have said annotations processed.
{code}
I once managed to have that other Exception instead, but I don't remember how :
{code}
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! com.sun.faces.config.WebConfiguration cannot be cast to com.sun.faces.config.WebConfiguration
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:213)
{code}
(Full stack here : [http://www.copypastecode.com/62278/http://www.copypastecode.com/62282/])
Is there a mean to do that ?
Thanks !