I’m upgrading our webapp from JSF1.2 to JSF2.
Our VDL is JSP. We are using Richfaces 3.3.3
I have a h:selectOneMenu and h:outputText that use the following property:
converter="SelectObjectConverter"
The ‘SelectObjectConverter’ is defined in the faces-config.xml:
<converter>
<converter-id>SelectObjectConverter</converter-id>
<converter-class>com.vc.mm.utils.jsf.converter.SelectObjectConverter</converter-class>
</converter>
The converter works as expected in JSF1.2 but not in JSF2.
Here is the error message:
exception: org.apache.jasper.el.JspELException: /bla/bla/foobar.jsp (14,1) ‘SelectObjectConverter’ Cannot coerce from class java.lang.String to interface javax.faces.convert.Converter
If I use this syntax :
<f:converter converterId="SelectObjectConverter"/>
It’s work!
But, as we have a lot of files with the other syntax, I would like to find the cause.
The faces-config file header has been updated to:
<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">
In our ear/lib, there was a jbpm.jar and juel**.jar.
juel.jar is an open source implementation of EL. Removing all “juel” jar fixes the problem.
I guess juel was providing the (wrong) EL implementation to JSF.