You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2013/03/03 12:51:13 UTC
[jira] [Commented] (BEANUTILS-421) NullPointerException in
BeanUtilsBean.setProperty
[ https://issues.apache.org/jira/browse/BEANUTILS-421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13591717#comment-13591717 ]
Benedikt Ritter commented on BEANUTILS-421:
-------------------------------------------
Hi Maxim,
your patch will cause failures in the test environment (see below). I still don't understand what exactly is causing the failures in your application. It would helpful to have some example code that reproduces the failure.
TIA!
Benedikt
{code}
-------------------------------------------------------------------------------
Test set: org.apache.commons.beanutils.BeanUtilsTestCase
-------------------------------------------------------------------------------
Tests run: 55, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.402 sec <<< FAILURE!
testPopulateArrayElements(org.apache.commons.beanutils.BeanUtilsTestCase) Time elapsed: 0.04 sec <<< ERROR!
java.lang.NullPointerException
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:984)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
at org.apache.commons.beanutils.BeanUtilsTestCase.testPopulateArrayElements(BeanUtilsTestCase.java:633)
-------------------------------------------------------------------------------
Test set: org.apache.commons.beanutils.BeanUtils2TestCase
-------------------------------------------------------------------------------
Tests run: 55, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.44 sec <<< FAILURE!
testPopulateArrayElements(org.apache.commons.beanutils.BeanUtils2TestCase) Time elapsed: 0.002 sec <<< ERROR!
java.lang.NullPointerException
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:984)
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
at org.apache.commons.beanutils.BeanUtilsTestCase.testPopulateArrayElements(BeanUtilsTestCase.java:633)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:95)
at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:132)
at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:109)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:158)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
{code}
> NullPointerException in BeanUtilsBean.setProperty
> -------------------------------------------------
>
> Key: BEANUTILS-421
> URL: https://issues.apache.org/jira/browse/BEANUTILS-421
> 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
>
>
> I got the following exception on some servers:
> javax.servlet.ServletException: BeanUtils.populate
> at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:475)
> at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50)
> at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60)
> at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
> at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
> at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
> at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
> at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
> at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
> at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
> Caused by: java.lang.NullPointerException
> at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:982)
> at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:830)
> at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:433)
> at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:473)
--
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: http://www.atlassian.com/software/jira