java.lang.ClassCastException: org.kuali.rice.location.impl.postalcode.PostalCodeBo cannot be cast to org.kuali.rice.krad.bo.ExternalizableBusinessObject

Kuali JIRA | Jonathan Keller | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    The externalizableBusinessObjectImplementations setup for the KEW, KIM, and Location modules are not correct given the current inheritance of the BO classes. Per the RemoteModuleServiceBase class, the value of each of those map entries must implement the ExternalizableBusinessObject interface. However most do not. This is causing a number of lookups and inquiries to fail in KFS with exceptions like the following: {noformat} 2012-04-05 09:53:31,681 [http-8080-1] ERROR org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean :: Unable to get property descriptor for org.kuali.kfs.module.cam.businessobject.AssetLocation . postalZipCode.postalCode java.lang.RuntimeException: Error occured while trying to create a new instance for class class org.kuali.rice.location.framework.postalcode.PostalCodeEbo Apr 5, 2012 9:53:31 AM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.ClassCastException: org.kuali.rice.location.impl.postalcode.PostalCodeBo cannot be cast to org.kuali.rice.krad.bo.ExternalizableBusinessObject at org.kuali.rice.krad.service.impl.RemoteModuleServiceBase.createNewObjectFromExternalizableClass(RemoteModuleServiceBase.java:475) at org.kuali.rice.krad.util.ObjectUtils.createNewObjectFromClass(ObjectUtils.java:1057) at org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getPropertyDescriptor(PojoPropertyUtilsBean.java:391) at org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getUnreachableNestedProperty(PojoPropertyUtilsBean.java:230) at org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getNestedProperty(PojoPropertyUtilsBean.java:215) at org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getProperty(PojoPropertyUtilsBean.java:70) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:426) at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:880) at org.apache.struts.taglib.html.BaseFieldTag.prepareValue(BaseFieldTag.java:126) at org.apache.struts.taglib.html.BaseFieldTag.renderInputElement(BaseFieldTag.java:102) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:80) at org.apache.struts.taglib.html.HiddenTag.doStartTag(HiddenTag.java:69) at org.kuali.rice.kns.web.taglib.html.KNSHiddenTag.doStartTag(KNSHiddenTag.java:36) at org.apache.jsp.tag.web.module.cams.assetLocation_tag._jspx_meth_html_005fhidden_005f0(assetLocation_tag.java:613) at org.apache.jsp.tag.web.module.cams.assetLocation_tag.access$20(assetLocation_tag.java:602) at org.apache.jsp.tag.web.module.cams.assetLocation_tag$Helper.invoke3(assetLocation_tag.java:847) at org.apache.jsp.tag.web.module.cams.assetLocation_tag$Helper.invoke(assetLocation_tag.java:897) at org.apache.jsp.tag.web.kr.inquiry_tag.doTag(inquiry_tag.java:136) {noformat}

    Kuali JIRA | 5 years ago | Jonathan Keller
    java.lang.ClassCastException: org.kuali.rice.location.impl.postalcode.PostalCodeBo cannot be cast to org.kuali.rice.krad.bo.ExternalizableBusinessObject
  2. 0

    The externalizableBusinessObjectImplementations setup for the KEW, KIM, and Location modules are not correct given the current inheritance of the BO classes. Per the RemoteModuleServiceBase class, the value of each of those map entries must implement the ExternalizableBusinessObject interface. However most do not. This is causing a number of lookups and inquiries to fail in KFS with exceptions like the following: {noformat} 2012-04-05 09:53:31,681 [http-8080-1] ERROR org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean :: Unable to get property descriptor for org.kuali.kfs.module.cam.businessobject.AssetLocation . postalZipCode.postalCode java.lang.RuntimeException: Error occured while trying to create a new instance for class class org.kuali.rice.location.framework.postalcode.PostalCodeEbo Apr 5, 2012 9:53:31 AM org.apache.catalina.core.ApplicationDispatcher invoke SEVERE: Servlet.service() for servlet jsp threw exception java.lang.ClassCastException: org.kuali.rice.location.impl.postalcode.PostalCodeBo cannot be cast to org.kuali.rice.krad.bo.ExternalizableBusinessObject at org.kuali.rice.krad.service.impl.RemoteModuleServiceBase.createNewObjectFromExternalizableClass(RemoteModuleServiceBase.java:475) at org.kuali.rice.krad.util.ObjectUtils.createNewObjectFromClass(ObjectUtils.java:1057) at org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getPropertyDescriptor(PojoPropertyUtilsBean.java:391) at org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getUnreachableNestedProperty(PojoPropertyUtilsBean.java:230) at org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getNestedProperty(PojoPropertyUtilsBean.java:215) at org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getProperty(PojoPropertyUtilsBean.java:70) at org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:426) at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:880) at org.apache.struts.taglib.html.BaseFieldTag.prepareValue(BaseFieldTag.java:126) at org.apache.struts.taglib.html.BaseFieldTag.renderInputElement(BaseFieldTag.java:102) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:80) at org.apache.struts.taglib.html.HiddenTag.doStartTag(HiddenTag.java:69) at org.kuali.rice.kns.web.taglib.html.KNSHiddenTag.doStartTag(KNSHiddenTag.java:36) at org.apache.jsp.tag.web.module.cams.assetLocation_tag._jspx_meth_html_005fhidden_005f0(assetLocation_tag.java:613) at org.apache.jsp.tag.web.module.cams.assetLocation_tag.access$20(assetLocation_tag.java:602) at org.apache.jsp.tag.web.module.cams.assetLocation_tag$Helper.invoke3(assetLocation_tag.java:847) at org.apache.jsp.tag.web.module.cams.assetLocation_tag$Helper.invoke(assetLocation_tag.java:897) at org.apache.jsp.tag.web.kr.inquiry_tag.doTag(inquiry_tag.java:136) {noformat}

    Kuali JIRA | 5 years ago | Jonathan Keller
    java.lang.ClassCastException: org.kuali.rice.location.impl.postalcode.PostalCodeBo cannot be cast to org.kuali.rice.krad.bo.ExternalizableBusinessObject

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.kuali.rice.location.impl.postalcode.PostalCodeBo cannot be cast to org.kuali.rice.krad.bo.ExternalizableBusinessObject

      at org.kuali.rice.krad.service.impl.RemoteModuleServiceBase.createNewObjectFromExternalizableClass()
    2. org.kuali.rice
      PojoPropertyUtilsBean.getProperty
      1. org.kuali.rice.krad.service.impl.RemoteModuleServiceBase.createNewObjectFromExternalizableClass(RemoteModuleServiceBase.java:475)
      2. org.kuali.rice.krad.util.ObjectUtils.createNewObjectFromClass(ObjectUtils.java:1057)
      3. org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getPropertyDescriptor(PojoPropertyUtilsBean.java:391)
      4. org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getUnreachableNestedProperty(PojoPropertyUtilsBean.java:230)
      5. org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getNestedProperty(PojoPropertyUtilsBean.java:215)
      6. org.kuali.rice.kns.web.struts.form.pojo.PojoPropertyUtilsBean.getProperty(PojoPropertyUtilsBean.java:70)
      6 frames
    3. Apache Commons BeanUtils
      PropertyUtils.getProperty
      1. org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:426)
      1 frame
    4. struts
      HiddenTag.doStartTag
      1. org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:880)
      2. org.apache.struts.taglib.html.BaseFieldTag.prepareValue(BaseFieldTag.java:126)
      3. org.apache.struts.taglib.html.BaseFieldTag.renderInputElement(BaseFieldTag.java:102)
      4. org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:80)
      5. org.apache.struts.taglib.html.HiddenTag.doStartTag(HiddenTag.java:69)
      5 frames
    5. org.kuali.rice
      KNSHiddenTag.doStartTag
      1. org.kuali.rice.kns.web.taglib.html.KNSHiddenTag.doStartTag(KNSHiddenTag.java:36)
      1 frame
    6. org.apache.jsp
      inquiry_tag.doTag
      1. org.apache.jsp.tag.web.module.cams.assetLocation_tag._jspx_meth_html_005fhidden_005f0(assetLocation_tag.java:613)
      2. org.apache.jsp.tag.web.module.cams.assetLocation_tag.access$20(assetLocation_tag.java:602)
      3. org.apache.jsp.tag.web.module.cams.assetLocation_tag$Helper.invoke3(assetLocation_tag.java:847)
      4. org.apache.jsp.tag.web.module.cams.assetLocation_tag$Helper.invoke(assetLocation_tag.java:897)
      5. org.apache.jsp.tag.web.kr.inquiry_tag.doTag(inquiry_tag.java:136)
      5 frames