javax.el.PropertyNotFoundException:在类型com.ui.InfoTemplate上找不到属性'InfoController'

时间:2014-08-27 11:14:56

标签: jsf el jsf-1.2 ibm-was

您好我正在尝试将我的应用程序从WAS 6.0迁移到WAS 8.5,只需更改代码。我的应用程序是用JSF 1.1编写的,WAS8.5不支持。我也写了它的吸气剂和制定者。此应用程序在WAS6.0 / 6.1中运行良好,但在WAS8.5中运行时显示异常。我必须在我的项目中添加所有Jars以便它能够正常工作。我得到以下例外:

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)

1 个答案:

答案 0 :(得分:2)

你有一个EL语法错误。异常消息表明您有类似

的内容
public class InfoTemplate {

    public InfoController getInfoController() {
        return infoController;
    }

}

并且您尝试以InfoController

的身份访问该媒体资源
#{infoTemplate.InfoController}

这是错误的。如果不以2个大写字母开头,则属性名称必须以小写字母开头。

#{infoTemplate.infoController}

我不确定它在旧的WAS版本中是如何工作的。它应该在那里以同样的方式失败。