我想迁移JSF版本,并将此网址用作参考Migrating from JSF 1.2 to JSF 2.0
我的视图文件更改为
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:sf="http://www.springframework.org/tags/faces"
xmlns:fmt="http://java.sun.com/jstl/fmt"
xmlns:sec="http://www.springframework.org/security/facelets/tags">
faces-config file changed as:
<faces-config version="2.0"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd">
但是在weblogic中部署我的应用程序时。 我收到以下错误
用户定义的侦听器com.sun.faces.config.ConfigureListener失败:java.lang.RuntimeException:com.sun.faces.config.ConfigurationException:CONFIGURATION FAILED!javax.faces.context.ExceptionHandlerFactory。 java.lang.RuntimeException:com.sun.faces.config.ConfigurationException:CONFIGURATION FAILED!位于weblogic.security的weblogic.servlet.internal.EventsManager $ FireContextListenerAction.run(EventsManager.java:481)的com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:287)中的javax.faces.context.ExceptionHandlerFactory。 acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)at weblogic.security.securityManager.runAs(SecurityManager.java:121)at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)at weblogic .loglet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)at at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:425)at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.ja) va:83)at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)at weblogic.application.internal.flow .ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:425)at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)at weblogic weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)中的.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)位于weblogic.application.internal.BaseDeployment $ 2.next(BaseDeployment。 java:1267)at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)at weblogic.application.internal.EarDeployment.activate(EarDeployment) .java:54)在weblogic.application.in netnal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java: 569)at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)at weblogic.deploy.internal .targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java) :1253)at weblogic.deploy.internal.targetserver.DeployManager.handleCommit(DeploymentManager.java:440)at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.com mit(DeploymentServiceDispatcher.java:163)at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access $ 100(DeploymentReceiverCallbackDeliverer.java:12 )at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer $ 2.run(DeploymentReceiverCallbackDeliverer.java:67)at weblogic.work.SelfTuningWorkManagerImpl $ WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)at weblogic.work.ExecuteThread.execute(ExecuteThread) .java:201)at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)引起:com.sun.faces.config.ConfigurationException:CONFIGURATION FAILED! com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:357)中的javax.faces.context.ExceptionHandlerFactory位于weblogic.servlet的com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:219)。 intra.EventsManager $ FireContextListenerAction.run(EventsManager.java:481)at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045 )weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver) .java:425)在webl位于weblogic.application.internal.flow.Module.Dinver.start(ModuleStateDriver.java:119)的weblogic.application.internal.flow.ScopedModuleDriver.start中的ogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)(ScopedModuleDriver。 java:200)at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:425)at weblogic.application.utils。位于weblogic的weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)的weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)中的StateMachineDriver.nextState(StateMachineDriver.java:83) .application.internal.BaseDeployment $ 2.next(BaseDeployment.java:1267)at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)在weblogic.application.internal位于weblogic的weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)的weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)中的.EarDeployment.activate(EarDeployment.java:54)。 deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)位于weblogic.deploy.internal.targetserver.operations的weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)。在weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)的weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)上的ActivateOperation.doCommit(ActivateOperation.java:116) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)at weblogic.deploy.service.inget.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)at weblogic.deploy.service.internal.targetserver .deploymentReceiverCallbackDeliverer.access $ 100(DeploymentReceiverCallbackDeliverer.java:12)at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer $ 2.run(DeploymentReceiverCallbackDeliverer.java:67)at weblogic.work.SelfTuningWorkManagerImpl $ WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516 )at weblogic.work.ExecuteThread.exe(ExecuteThread.java:201)at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)引起:java.lang.IllegalArgumentException:javax的javax.faces.context.ExceptionHandlerFactory。 face.sactoryFinder.validateFactoryName(FactoryFinder.java:578)位于com.sun的javax.faces.FactoryFinder.setFactory(FactoryFinder.java:264)。 face.sconfig.config.processor.FactoryConfigProcessor.setFactory(FactoryConfigProcessor.java:283)位于com.sun.faces.configs.process.config.config.config.factory.FactoryConfigProcessor的com.sun.faces.config.processor.FactoryConfigProcessor.processFactories(FactoryConfigProcessor.java:239)。进程(FactoryConfigProcessor.java:193)位于com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:338)的com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:219)at weblogic.servlet .internal.EventsManager $ FireContextListenerAction.run(EventsManager.java:481)at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121 )at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1801)at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java: 3045 )weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver) .java:425)at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)at weblogic.application.internal.flow。 ScopedModuleDriver.start(ScopedModuleDriver.java:200)at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)at weblogic.application.internal.flow.ModuleStateDriver $ 3.next(ModuleStateDriver.java:425)at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow。 java:27)at weblogic.application.interna l.BaseDeployment $ 2.next(BaseDeployment.java:1267)位于weblogic的weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)的weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)。 weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)中的weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)中的application.internal.EarDeployment.activate(EarDeployment.java:54) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)at weblogic.deploy.internal.targetserver .operations.ActivateOperation.doCommit(ActivateOperation.java:116)at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)at weblogic.deploy.internal.targetserver.DeploymentManager.handleDepl oymentCommit(DeploymentManager.java:844)位于weblogic.deploy.deploy.dget中的weblogic.deploy.internal.targetserver.DeployManager。位于weblogic.deploy.service.inget.target服在weblogic上的weblogic.de.Sloy.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer $ 2.run(DeploymentReceiverCallbackDeliverer.java:67)的weblogic.work.SelfTuningWorkManagerImpl $ WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)处获得$ 100(DeploymentReceiverCallbackDeliverer.java:12)。 work.ExecuteThread.execute(ExecuteThread.java:201)at weblogic.work.ExecuteThread.run(ExecuteThrea d.java:173)
如果我们错在哪里或需要做什么,请帮助我们。
提前致谢..
答案 0 :(得分:0)
看看Mkyong的博客文章:
事实是你使用的是Weblogic,没有Tomcat,但问题的原因可能是相同的:Weblogic在javaee.jar文件中选择了JSF 1.2 api而不是新的JSF 2.0 api。从项目类路径中删除该文件,而不是清除服务器上的项目,然后重新部署它。我希望这会有所帮助!