MyFaces基本项目无法启动

时间:2018-10-27 21:49:50

标签: java myfaces

我正在尝试启动一个在这里找到的非常基本的项目:

The HelloWorld example of JSF 2.2 with Myfaces

只需从here克隆git。

现在,我尝试了不同的方法,但由于我认为这个问题,所以无法修改我的App Server中的JSF Mojarra共存:

<27-ott-2018 23.44.46,046 CEST> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 9 task for the application "jsf_myfaces" on [partition-name: DOMAIN].> 
<27-ott-2018 23.44.46,048 CEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application "jsf_myfaces".> 
<27-ott-2018 23.44.46,048 CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory. 
    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:233)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
    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.application.ApplicationFactory. 
    at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:561)
    at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:283)
    at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:169)
    at org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:231)
    at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1488)
    Truncated. see log file for complete stacktrace

与此有关。 尝试过JBoss Wildfly 8.2和Weblogic 12c R2,是同一故事。

1 个答案:

答案 0 :(得分:0)

这是启动项目的正确方法,将myfaces依赖项jar放在服务器容器中的依赖项的前面:

weblogic-prefer-application-packages-not-working

JBoss的简单部署描述符可能会完成相同的任务。