Search code examples
jsf-2elfacelets

ELException - Property not found - JSF 2.1


Our application is running with JSF (MyFaces, Trinidad) 1.2 on WebSphere 8.5. We are upgrading it to JSF 2.1. I'm getting the below exception with JSF 2.1

JSPX Code: #{loginBackingBean.switchSkin}
Java Code: public String switchSkin() {...} - This is a method.

Caused by: javax.el.ELException: /header.jspx: Property 'switchSkin' not found on type com.LoginBackingBean at org.apache.myfaces.view.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:55) at org.apache.myfaces.view.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:46)

000001ba ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause faces: javax.servlet.ServletException: /header.jspx: Property 'switchSkin' not found on type com.LoginBackingBean at javax.faces.webapp.FacesServlet.service(FacesServlet.java:229) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)

Note: Same exception is NOT occurring with JSF 1.2 and 2.0.
Please help me to resolve this problem.


Solution

  • I've updated the Facelets from 1.X to 2.X but I haven't updated the XMLNS and due to this I got those errors. I solved the problem by correcting XMLNS for jstl.
    http://java.sun.com/jstl/core
    to:
    http://java.sun.com/jsp/jstl/core