SpringBeanFacesELResolver的javax.faces.el.VariableResolver类强制转换异常
我正在尝试升级到JSF2和Spring3.0.5,当我部署到Tomcat时,我遇到了以下错误 谢谢你的帮助SpringBeanFacesELResolver的javax.faces.el.VariableResolver类强制转换异常,spring,jsf,Spring,Jsf,我正在尝试升级到JSF2和Spring3.0.5,当我部署到Tomcat时,我遇到了以下错误 谢谢你的帮助 SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: CO
SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
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(ConfigureListener.java:292)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
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(ConfigManager.java:375)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
... 8 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(ApplicationConfigProcessor.java:652)
at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:305)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:222)
at com.sun.faces.config.ConfigManager.initialize(ConfigM
anager.java:360)您没有提供太多信息,但您的配置中一定有问题。 小贴士:
- 错误的Spring或JSF版本,或者Tomcat库中的某个库被卡住了。您是否使用任何依赖关系管理?spring-web-xxx.jar的确切版本是什么?您使用的是什么JSF实现?那个版本是什么
- 任何xml配置文件中的schemalocation/version错误。异常表明问题在于faces配置。应该是这样的:
<faces-config 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" version="2.0"> <application> <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> </application>
和。如果您无法解决此问题,请发布一些配置文件。(appcontext.xml、web.xml、faces config.xml)您没有提供太多信息,但您的配置中一定有错误。 小贴士:- 错误的Spring或JSF版本,或者Tomcat库中的某个库被卡住了。您是否使用任何依赖关系管理?spring-web-xxx.jar的确切版本是什么?您使用的是什么JSF实现?那个版本是什么
- 任何xml配置文件中的schemalocation/version错误。异常表明问题在于faces配置。应该是这样的:
<faces-config 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" version="2.0"> <application> <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> </application>
和。如果您无法解决此问题,请发布一些配置文件。(appcontext.xml,web.xml,faces config.xml)多亏了它解决了这个问题,我需要从变量解析器更改为el解析器解决了这个问题的银行,我需要从变量解析器更改为el解析器