【问题标题】:JSF1.1 Webapp on WebSphere AS 7 IntrospectionExceptionWebSphere AS 7 IntrospectionException 上的 JSF1.1 Webapp
【发布时间】: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


【解决方案1】:

通过更新 IBM 的 JRE 版本解决了这个问题。实际上,我在想我正在使用最新版本的 IBM JRE。当然,我从 IBM 的站点IBM Development Package for Eclipse 下载了一个。问题是这个包包含相当旧版本的 IBM 的 java 1.6。我在 Websphere AS 的修订包中找到了 IBM 的 Java 的新版本。 您可以在 IBM 的 java 1.6 here 中找到已修复错误的详细列表

【讨论】:

    猜你喜欢
    • 2011-10-20
    • 2015-08-15
    • 2011-07-22
    • 1970-01-01
    • 2012-04-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多