javax.faces.el.VariableResolver Classcast Exception with SpringBeanFacesELResolver

后端 未结 1 2042
悲哀的现实
悲哀的现实 2021-01-15 19:01

I am trying to upgrade to JSF2 and Spring 3.0.5, I am getting the following error when I deploy to Tomcat.

Any help appreciated.

SEVERE: Exception se         


        
相关标签:
1条回答
  • 2021-01-15 19:32

    You don't give too much information but you must have something wrong in your configuration. Tips:

    • Wrong Spring or JSF version or some library is stuck in Tomcat lib. Are you using any kind of dependency management? What is the exact version of your spring-web-xxx.jar? What JSF implementation are you using? What's the version of that one?
    • Wrong schemalocation / version in any of your xml config files. Exception suggests the problem is with faces config. It should look like this:

      <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>
      

    You can find some examples here and here. If you are not able to resolve the issue, please post some of your config files. (appcontext.xml, web.xml, faces-config.xml)

    0 讨论(0)
提交回复
热议问题