Context : Weblogic 12.2.1 / JSF 2.1.6 / Spring Webflow 2.3.2
I am moving several JSF 2.1 applications from Weblogic 10.3.6 to Weblogic 12.2.1.
I successfully deployed the applications that do not integrate Webflow after some problems (first problem, second problem).
But now I have to deal with JSF application that integrates Spring Webflow 2.3.2 and I am facing new troubles.
This application has the following maven dependencies in addition :
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-webflow</artifactId>
<version>2.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.webflow</groupId>
<artifactId>spring-faces</artifactId>
<version>2.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.sun.facelets</groupId>
<artifactId>jsf-facelets</artifactId>
<version>1.1.14</version>
</dependency>
I did the same configuration that I explained in my second problem in the weblogic-application.xml
, but I get the following error :
Problem 1 :
weblogic.application.ModuleException: java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory.
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:237)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:232)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory.
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1008)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:343)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:294)
Truncated. see log file for complete stacktrace
I noticed that the following listener was present in web.xml
of my non-webflow JSF apps but not in my webflow JSF app.
So I added it, as advised in this post.
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
But now I get another error :
Problem 2 :
com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: com.sun.faces.config.ConfigurationException: Unable to parse document 'jar:file:/C:/bea12.2.1/wlserver/modules/glassfish.jsf.jar!/META-INF/mojarra_ext.taglib.xml': null
at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:672)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:362)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:725)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
Since Weblogic 12.2.1 comes with JSF 2.2 and my project comes with its own JSF 2.1, I thought about a resources' conflict and I added META-INF/mojarra_ext.taglib.xml
to weblogic-application.xml
such as :
<wls:prefer-application-resources>
<wls:resource-name>javax.faces.*</wls:resource-name>
<wls:resource-name>com.sun.faces.*</wls:resource-name>
<wls:resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</wls:resource-name>
<wls:resource-name>META-INF/services/com.sun.faces.spi.FacesConfigResourceProvider</wls:resource-name>
<wls:resource-name>META-INF/resources/javax.faces/jsf.js</wls:resource-name>
<wls:resource-name>META-INF/resources/javax.faces/jsf-uncompressed.js</wls:resource-name>
<wls:resource-name>META-INF/mojarra_ext.taglib.xml</wls:resource-name>
</wls:prefer-application-resources>
And this leads to this brand new error !!
Problem 3 :
com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! com.sun.facelets.tag.jstl.fn.JstlFnLibrary cannot be cast to com.sun.faces.facelets.tag.TagLibrary
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:375)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:725)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:326)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:196)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassCastException: com.sun.facelets.tag.jstl.fn.JstlFnLibrary cannot be cast to com.sun.faces.facelets.tag.TagLibrary
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTaglibraryClass(FaceletTaglibConfigProcessor.java:280)
at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:261)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:362)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:725)
So I am stuck with this error. I may have done something wrong in the previous steps.
Does anyone have an idea to help me ?
Thanks in advance.
I solved the problem by removing the
jsf-facelets
dependency which is not useful in my case :