我正在将spring与jsf集成,我得到以下例外

时间:2018-05-24 12:27:59

标签: spring jsf

我得到的例外情况 配置失败!

org.springframework.web.jsf.el.SpringBeanFacesELResolver cannot be 
  cast to javax.faces.el.VariableResolver`

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

这是我的facesconfig.xml

    <faces-config xmlns="http://xmlns.jcp.org/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
            http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd"
        version="2.2">


        <application>
        <variable-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</variable-esolver>


      </application>

    </faces-config>

STACK TRACE

    java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.springframework.web.jsf.el.SpringBeanFacesELResolver cannot be cast to javax.faces.el.VariableResolver
        at com.sun.faces.config.ConfigureListener.contextInitialized(Unknown Source)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4743)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5207)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
    Caused by: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.springframework.web.jsf.el.SpringBeanFacesELResolver cannot be cast to javax.faces.el.VariableResolver
        at com.sun.faces.config.ConfigManager.initialize(Unknown Source)
        ... 10 more
    Caused by: java.lang.ClassCastException: org.springframework.web.jsf.el.SpringBeanFacesELResolver cannot be cast to javax.faces.el.VariableResolver
        at com.sun.faces.config.processor.ApplicationConfigProcessor.addVariableResolver(Unknown Source)
        at com.sun.faces.config.processor.ApplicationConfigProcessor.process(Unknown Source)
        at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(Unknown Source)
        at com.sun.faces.config.processor.LifecycleConfigProcessor.process(Unknown Source)
        at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(Unknown Source)
        at com.sun.faces.config.processor.FactoryConfigProcessor.process(Unknown Source)
        ... 11 more

0 个答案:

没有答案