Search code examples
jsfeljsf-1.2ibm-was

javax.el.PropertyNotFoundException: Property 'InfoController' not found on type com.ui.InfoTemplate


Hi I am trying to migrating my application from WAS 6.0 to WAS 8.5 with minimal code change. My application is written in JSF 1.1 which is not supported in WAS8.5. I have written its getters and setters also. This application is working fine in WAS6.0/6.1 but while running in WAS8.5 it is showing Exceptions. What all Jars i have to add in my project so that it will work. I am getting following exceptions:

javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate javax.faces.el.EvaluationException: javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.convert.ValueExpressionToValueBinding.getValue(ValueExpressionToValueBinding.java:169)
at com.utilities.JsfUtility.getManagedBean(JsfUtility.java:107)
at com.ui.LandingPageController.getInfo(LandingPageController.java:92)

Caused by: javax.el.ELException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:127)

Caused by: javax.faces.el.EvaluationException: Property 'InfoController' not found on type com.ui.InfoTemplate
at org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:80)

Caused by: javax.el.PropertyNotFoundException: Property 'InfoController' not found on type com.ui.InfoTemplate
at javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:232)
at javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:209)

Solution

  • You've an EL syntax error. The exception message suggests that you've something like

    public class InfoTemplate {
    
        public InfoController getInfoController() {
            return infoController;
        }
    
    }
    

    And that you're attempting to access the property as InfoController:

    #{infoTemplate.InfoController}
    

    This is wrong. The property name, when not starting with 2 capitals or more, must start with lowercase.

    #{infoTemplate.infoController}
    

    I'm not sure how it worked in older WAS version. It should have failed the same way over there.