【发布时间】:2012-01-24 11:12:14
【问题描述】:
在将 Web 应用程序从 WAS 6.1 迁移到 WAS 7 期间出现异常。此应用程序使用 JSF1.1 (MyFaces) + Facelets + Spring(用于支持 bean)开发。在某些页面上,我收到以下异常:
Caused by: javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /pages/recovery_accs.xhtml][Class: javax.faces.component.html.HtmlForm,Id: sequestration][Class: javax.faces.component.html.HtmlDataTable,Id: _id37][Class: javax.faces.component.UIColumn,Id: _id50][Class: javax.faces.component.html.HtmlOutputText,Id: _id52]}
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getValue(RendererUtils.java:271)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:226)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:69)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:57)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:799)
... 46 more
Caused by: javax.faces.el.PropertyNotFoundException: /pages/sub/idocAccsRecoverySub.xhtml @34,55 value="#{varbean.idocAcc.vzOrder}": Bean: com.test.project.bean.idoc.accs.IdocAccBean, property: idocAcc
at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:58)
at javax.faces.component.UIOutput.getValue(UIOutput.java:118)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getValue(RendererUtils.java:267)
... 50 more
Caused by: java.beans.IntrospectionException: Parameter type in setter method does not corresponds to predefined.
at java.beans.PropertyDescriptor.setWriteMethod(Unknown Source)
at java.beans.PropertyDescriptor.<init>(Unknown Source)
at java.beans.StandardBeanInfo.introspectProperties(Unknown Source)
at java.beans.StandardBeanInfo.<init>(Unknown Source)
at java.beans.Introspector.getBeanInfoImpl(Unknown Source)
at java.beans.Introspector.getBeanInfoImpl(Unknown Source)
at java.beans.Introspector.getBeanInfoImplAndInit(Unknown Source)
at java.beans.Introspector.getBeanInfo(Unknown Source)
at org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:474)
at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:85)
at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
at org.apache.el.parser.AstValue.getValue(AstValue.java:123)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
at com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:56)
... 52 more
尝试使用不同版本的 facelet 库和不同的 EL 实现。甚至尝试使用 IBM 的 JDK 重新编译项目。仍然没有成功。在 Apache Tomcat 上运行没有问题。
在上面的堆栈跟踪中 - IdocAccBean 是一个常规的 Java bean,它扩展了一个抽象类 IdocAccCore。如果我使用扩展该类的其他支持 bean,我会得到相同的异常。不是从 IdocAccCore 派生的所有其他 bean 都可以正常工作。 IdocAccCore 类没有什么特别之处,而且它很大,所以我认为没有必要提供完整的源代码。
您有什么建议该 IdocAccCore 类有什么问题吗?
【问题讨论】:
-
更多细节 - 这个问题似乎与运行时环境有关。我尝试使用 IBMs JRE 在 Apache Tomcat 下运行我的 webapp,但遇到了同样的问题。使用 SUN 的 JRE 一切正常。此外,我发现我无法使用有效的 get 和 set 方法访问 IdocAccBean 类中的任何属性。
标签: spring jsf facelets websphere-7