用老项目weblogic + jsf 启动服务时报错
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:216)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
Truncated. see log file for complete stacktrace
Caused By: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! com.oracle.injection.integration.jsf.WeblogicFacesConfigResourceProvider cannot be cast to com.sun.faces.spi.ConfigurationResourceProvider
<启动时没有正确初始化应用程序,无法找到工厂:javax.faces.context.FacesContextFactory. Attempting to find backup.>
根据错误信息知道WeblogicFacesConfigResourceProvider不能转换成ConfigurationResourceProvider
可能是jsf的实现包有问题,jsf-api-2.2.20.jar 和 jsf-impl-2.2.20.jar两个,这两个的版本号必须要一致。有没有多余的不同版本,我是这种情况,有重复的jar包。删除重新引入jar就可以启动成功了