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.

1 comment:

  1. If you want you can check the item type, before accessing its properties.
    On JSP page,


Non-spammers: Thanks for visiting! Please go ahead and leave a comment; I read them all!

Attention SPAMMERS: I review all comments before they get posted, and I REPORT 100% of spam comments to Google as spam! Why not avoid getting your account banned as quickly -- and save us both a little time -- by skipping this comment form and moving on to the next one on your list? Thanks, and I hope you have a great day!