gpt4 book ai didi

jsf - java.lang.IllegalStateException : Could not find backup for factory javax. 面.application.ApplicationFactory

转载 作者:行者123 更新时间:2023-12-04 14:29:59 33 4
gpt4 key购买 nike

我已将应用程序升级为使用 javax.faces-2.2.4 和 primefaces-4.0 jar。在将我的应用程序从 myeclipse 部署到 weblogic 后,出现以下错误:

Jan 10, 2014 2:37:13 PM javax.faces.FactoryFinder$FactoryManager getFactory
SEVERE: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory. Attempting to find backup.
Jan 10, 2014 2:37:13 PM com.sun.faces.config.ConfigureListener contextDestroyed
SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:1135)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:379)
at com.sun.faces.config.InitFacesContext.getApplication(InitFacesContext.java:140)
at com.sun.faces.config.ConfigureListener.contextDestroyed(ConfigureListener.java:310)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:482)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.EventsManager.notifyContextDestroyedEvent(EventsManager.java:200)
at weblogic.servlet.internal.WebAppServletContext.destroy(WebAppServletContext.java:3225)
at weblogic.servlet.internal.ServletContextManager.destroyContext(ServletContextManager.java:247)
at weblogic.servlet.internal.HttpServer.unloadWebApp(HttpServer.java:461)
at weblogic.servlet.internal.WebAppModule.destroyContexts(WebAppModule.java:1545)
at weblogic.servlet.internal.WebAppModule.deactivate(WebAppModule.java:509)
at weblogic.application.internal.flow.ModuleStateDriver$2.previous(ModuleStateDriver.java:387)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
at weblogic.application.internal.flow.ModuleStateDriver.deactivate(ModuleStateDriver.java:141)
at weblogic.application.internal.flow.ScopedModuleDriver.deactivate(ScopedModuleDriver.java:206)
at weblogic.application.internal.flow.ModuleListenerInvoker.deactivate(ModuleListenerInvoker.java:261)
at weblogic.application.internal.flow.DeploymentCallbackFlow$2.previous(DeploymentCallbackFlow.java:547)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:215)
at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:192)
at weblogic.application.internal.flow.DeploymentCallbackFlow.deactivate(DeploymentCallbackFlow.java:184)
at weblogic.application.internal.BaseDeployment$2.previous(BaseDeployment.java:677)
at weblogic.application.utils.StateMachineDriver.previousState(StateMachineDriver.java:223)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:63)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:59)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:200)
at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

甚至 ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext ) 方法都没有被调用

最佳答案

java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.

此异常的更常见原因之一是 webapp 的运行时类路径被多个不同的 JSF API 版本污染,这些版本相互冲突/混淆。

您的情况也可能是这种情况。 Weblogic 本身已经与 JSF 捆绑在一起,但是您要随 webapp 一起提供另一个。因此,您最终会在 Web 应用程序的运行时类路径中得到两个不同版本的 JSF API。

我不做 Weblogic,但基本上你有 2 个选择:

  1. 告诉 Weblogic 不要加载其捆绑的 JSF,以便有效地只加载 webapp 捆绑的 JSF。
  2. 如果您打算升级 Weblogic 的捆绑 JSF 版本,则不要通过您的 webapp 升级它,而是直接在 Weblogic 本身中升级。或者,如果所需的 JSF API 版本与服务器的 Servlet 版本不兼容(JSF 2.2 需要 Servlet 3.0),则将整个服务器升级到更新的版本。

查阅其管理文档以获取线索。

关于jsf - java.lang.IllegalStateException : Could not find backup for factory javax. 面.application.ApplicationFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21040515/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com