java.lang.IllegalStateException: Could not find backup for factory javax.faces.context.FacesContextFactory
(Doc ID 2122194.1)
Last updated on SEPTEMBER 29, 2020
Applies to:Oracle WebLogic Server - Version 220.127.116.11.0 and later
Information in this document applies to any platform.
Customer application works using JSF 2.1.5 as out of the box in WLS 12.1.1. Now they have upgraded to WLS 12.2.1, but need to continue to use JSF version 2.1.5 and not version 2.2.8 offered by WLS 12.2.1.
In order to do this, having more applications based on JSF, they took advantage of the mechanism described here: https://docs.oracle.com/cd/E13222_01/wls/docs92/programming/classloading.html#filteri
Customer specified in weblogic-application.xml both prefer-application-packages and prefer-application-resources as shown below:
The same works fine if the <prefer-application-resources> are defined in the WEB-INF/weblogic.xml of the WAR. The WAR file gets deployed successfully.
The customer tried to include the package javax.faces.context.* in the <prefer-application-packages> in the weblogic-application.xml but had no success. They also included the jsf-api-2.x.x.jar and jsf-impl-2.x.x.jar files under the EAR/lib folder and verified the application runtime classpath to make sure it is not polluted with multiple JSF impls/versions.
Issue is seen only if the <prefer-application-resources> are defined in the META-INF/weblogic-application.xml in the EAR.
Issue is NOT seen if the <prefer-application-resources> are defined in the WEB-INF/weblogic.xml of the WAR.
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document