commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Flaig (JIRA)" <>
Subject [jira] [Commented] (BEANUTILS-421) NullPointerException in BeanUtilsBean.setProperty
Date Mon, 27 May 2013 10:45:31 GMT


Jochen Flaig commented on BEANUTILS-421:

We also experienced a NullPointerException in BeanUtils.populate(). I not sure, whether our
problem is related to this one, but I’d like to give you the information in case it might
be useful. The problem occurred to us for the first time after upgrading our JRE from 1.7.0_09
to 1.7.0_11.

In our application, we have a bean class that derives another bean class, and the latter provides
an indexed property. If the first access to that indexed property (after starting the JVM)
is made via the derived class, everything is fine (see test case "DerivedFirstTest"). But
if we access that indexed property for the first time via the base class, it’s impossible
to set the property in the derived class (see "BaseFirstTest").

It seems that a call to PropertyUtilsBean.getPropertyDescriptors() on the base class “ruins”
the property descriptors for the derived class (see "IntrospectionTest"). May be the work-around
for bug 28358 modifies the descriptors received form java.beans.BeanInfo in a way, that is
not compatible with the caching of the property descriptors inside the JRE classes. Wouldn’t
it be safer to work on a copy of the property descriptor when modifying it?

> NullPointerException in BeanUtilsBean.setProperty
> -------------------------------------------------
>                 Key: BEANUTILS-421
>                 URL:
>             Project: Commons BeanUtils
>          Issue Type: Bug
>          Components: Bean / Property Utils
>    Affects Versions: 1.8.3
>            Reporter: Maxim Kramarenko
>            Assignee: Benedikt Ritter
>            Priority: Blocker
>             Fix For: 1.8.4
>         Attachments:
> I got the following exception on some servers:
>    javax.servlet.ServletException: BeanUtils.populate
> 	at org.apache.struts.util.RequestUtils.populate(
> 	at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(
> 	at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(
> 	at org.apache.struts.chain.commands.ActionCommandBase.execute(
> 	at org.apache.commons.chain.impl.ChainBase.execute(
> 	at org.apache.commons.chain.generic.LookupCommand.execute(
> 	at org.apache.commons.chain.impl.ChainBase.execute(
> 	at org.apache.struts.chain.ComposableRequestProcessor.process(
> 	at org.apache.struts.action.ActionServlet.process(
> 	at org.apache.struts.action.ActionServlet.doPost(
> Caused by: java.lang.NullPointerException
> 	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(

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

View raw message