views:

1292

answers:

4

Hello,

I am trying to integrate spring into a jsf application.

In faces-config.xml I have included this:

<application>    
     <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
     <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>

</application>

but it shows a weird warning which I can't get rid of:

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

any ideas ? thanks!

A: 

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

McDowell
A: 

Hi I have dthe same problem with JBoss 4.0 and jdk1.5 on windows/eclipse

Any idea?

A: 

Please check the JAR files you are using in application. Again the class paths set in application. I think it is because of the class conflicts in application class paths.

Umesh Aawte
A: 

Well my problem disappeared substituting these lines by:

<!-- variable/property resolver registration -->
    <application>
     <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
     <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>

hope it helps!

markitus82