Friday, July 12, 2013

ATG Error: PropertyNotFoundException: The class 'atg.adapter.gsa.GSAItem' does not have the property …"

Earlier today, I was investigating a problem where a particular JSP page in an ATG Commerce application failed rendering midway through.  In the ATG application log, the following stack trace appeared:

<Jul 12, 2013 1:37:36 PM EDT> <Error> <HTTP> <WL-101020> <[ServletContext@1926834063[app:myApp-unpacked module:app path:/root spec-version:2.5]] Servlet failed with Exception
javax.el.PropertyNotFoundException: The class 'atg.adapter.gsa.GSAItem' does not have the property 'name'.
    at javax.el.BeanELResolver.getBeanProperty(
    at javax.el.BeanELResolver.getValue(
    at javax.el.CompositeELResolver.getValue(
    at com.sun.el.parser.AstValue.getValue(
    at com.sun.el.ValueExpressionImpl.getValue(
    at weblogic.servlet.jsp.ELHelper.evaluate(
    at jsp_servlet._web_45_inf._fragments._panels._lists.__page._jsp__tag6(

The problem turned out to be that an upstream JSP that was passing an object parameter into the page I was looking at had had a bug introduced where it started passing an object of type RepositoryItem, instead of the expected type.  The error occurred when my JSP code assumed that the parameter object was of a particular type, and attempted to call a method on the object that didn’t exist on the RepositoryItem object.