struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Benedict (JIRA)" <>
Subject [jira] Commented: (STR-2989) NullPointerException on indexed properties only on session timeout
Date Tue, 19 Dec 2006 05:03:57 GMT
    [ ] 
Paul Benedict commented on STR-2989:

The logic tags throw a NPE when they reference a null object. This is not a bug. If you need
graceful handling of null objects, use JSTL which can check when references are empty.

As for the arrays, I am pretty sure arrays are not allocated automatically. They return to
null after a request or when the session expires. If the array has to be there, you need to
instantiate it in your constructor.

> NullPointerException on indexed properties only on session timeout
> ------------------------------------------------------------------
>                 Key: STR-2989
>                 URL:
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.9
>         Environment: Windows XP, WebLogic 8.1 
>            Reporter: Steve Klosterbuer
> I have an ActionForm that has a getter and setter for a Collection of Objects.  The jsp
uses the logic:iterate tag to output the indexed nested properties.  Everything works fine
until the session times out.  Then I get the following stack trace:
> java.lang.NullPointerException
> 	at org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(
> 	at org.apache.commons.beanutils.PropertyUtilsBean.getIndexedProperty(
> 	at org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(
> 	at org.apache.commons.beanutils.PropertyUtilsBean.getProperty(
> 	at org.apache.commons.beanutils.BeanUtilsBean.setProperty(
> 	at org.apache.commons.beanutils.BeanUtilsBean.populate(
> 	at org.apache.commons.beanutils.BeanUtils.populate(
> 	at org.apache.struts.util.RequestUtils.populate(
> 	at org.apache.struts.action.RequestProcessor.processPopulate(
> 	at org.apache.struts.action.RequestProcessor.process(
> 	at org.apache.struts.action.ActionServlet.process(
> 	at org.apache.struts.action.ActionServlet.doPost(
> 	at javax.servlet.http.HttpServlet.service(
> 	at javax.servlet.http.HttpServlet.service(
> 	at weblogic.servlet.internal.StubSecurityHelper$
> 	at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(
> 	at weblogic.servlet.internal.ServletStubImpl.execute(
> 	at weblogic.servlet.internal.ServletStubImpl.execute(
> 	at weblogic.servlet.internal.WebAppServletContext$
> 	at
> 	at
> 	at weblogic.servlet.internal.WebAppServletContext.securedExecute(
> 	at weblogic.servlet.internal.WebAppServletContext.execute(
> 	at
> 	at
> 	at

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message