Class org.springframework.web.jsf.el.SpringBeanFacesELResolver must extend the type javax.el.ELResolver Class org.springframework.web.jsf.el.SpringBeanFacesELResolver must extend the type javax.el.ELResolver spring spring

Class org.springframework.web.jsf.el.SpringBeanFacesELResolver must extend the type javax.el.ELResolver


From the spring documentation, you will see that for org.springframework.web.jsf.el.SpringBeanFacesELResolver:

delegates to the Spring's 'business context' WebApplicationContext first, then to the default resolver of the underlying JSF implementation

and for org.springframework.web.jsf.DelegatingVariableResolver:

will first delegate value lookups to the default resolver of the underlying JSF implementation and then to Spring's 'business context' WebApplicationContext

As you can see, the behavior is very different. If you don't care about order, you are fine, but if you actually did intend to use org.springframework.web.jsf.el.SpringBeanFacesELResolver then all you have to do is ensure the version of el-api.jar in your dependencies is compatible with your version of spring. For me, I have this (in my maven pom):

<dependency>    <groupId>org.springframework</groupId>    <artifactId>spring-web</artifactId>    <version>3.0.5.RELEASE</version>    <type>jar</type>    <scope>compile</scope></dependency><dependency>    <groupId>org.apache.tomcat</groupId>    <artifactId>el-api</artifactId>    <version>6.0.32</version>    <type>jar</type>    <scope>provided</scope></dependency>


This is possibly a ClassLoader configuration issue. If the SpringBeanFacesELResolver's parent class is from a different ClassLoader to the one used by the JSF classes doing the bootstrapping, the check to see if it is an instance of ELResolver will fail.

Problems like this can happen if you have a META-INF/faces-config.xml in the global classpath, but I suppose there could be other causes.

It would help if you posted information on what container you are using, the classloader policy for your application and where you've placed any third party libraries (such as the Facelets and Spring libs).


To solve this type of problem you should extend project with javax prefix because Class ELResolver is an abstract class under javax.el package.

Here is code:

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

More information about ELResolver class you can get by link.