org.springframework.beans.InvalidPropertyException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • {code:java} org.springframework.beans.InvalidPropertyException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Illegal attempt to get property 'applicationInfoList' threw exception; nested exception is org.springframework.beans.NullValueInNestedPathException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Cannot access indexed value of property referenced in indexed property path 'applicationInfoList[0]': returned null at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:826) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:532) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:904) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76) at org.springframework.validation.DataBinder.applyPropertyValues(DataBinder.java:673) at org.springframework.validation.DataBinder.doBind(DataBinder.java:569) at org.springframework.web.bind.WebDataBinder.doBind(WebDataBinder.java:191) at org.springframework.web.bind.ServletRequestDataBinder.bind(ServletRequestDataBinder.java:110) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:734) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:815) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:359) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:171) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:427) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:415) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:788) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:717) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: org.springframework.beans.NullValueInNestedPathException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Cannot access indexed value of property referenced in indexed property path 'applicationInfoList[0]': returned null at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:744) ... 32 more {code}
    via by Parthiban Samykutti,
  • {code:java} org.springframework.beans.InvalidPropertyException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Illegal attempt to get property 'applicationInfoList' threw exception; nested exception is org.springframework.beans.NullValueInNestedPathException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Cannot access indexed value of property referenced in indexed property path 'applicationInfoList[0]': returned null at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:826) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:532) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:904) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76) at org.springframework.validation.DataBinder.applyPropertyValues(DataBinder.java:673) at org.springframework.validation.DataBinder.doBind(DataBinder.java:569) at org.springframework.web.bind.WebDataBinder.doBind(WebDataBinder.java:191) at org.springframework.web.bind.ServletRequestDataBinder.bind(ServletRequestDataBinder.java:110) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:734) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:815) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:359) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:171) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:427) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:415) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:788) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:717) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: org.springframework.beans.NullValueInNestedPathException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Cannot access indexed value of property referenced in indexed property path 'applicationInfoList[0]': returned null at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:744) ... 32 more {code}
    via by Parthiban Samykutti,
  • Not sure if this is abug or I am doing something wrong: public class TestForm { private Boolean testBoolean; private String[] arrayOne; private String[] arrayTwo; public TestForm() {} public String[] getArrayOne() { return this.arrayOne; } public void setArrayOne(String[] arrayOne) { this.arrayOne = arrayOne; } public String[] getArrayTwo() { return this.arrayTwo; } public void setArrayTwo(String[] arrayTwo) { this.arrayTwo = arrayTwo; } public Boolean getTestBoolean() { return this.testBoolean; } public void setTestBoolean(Boolean testBoolean) { this.testBoolean = testBoolean; } } --------------------------------------------- And my test case is : --------------------------------------------- public void testBindWithInitializer() throws ServletException { ServletContext sc = new MockServletContext(); MockHttpServletRequest request = new MockHttpServletRequest(sc); request.addParameter("testBoolean", "true"); request.addParameter("arrayTwo", "arraytwo_1,arraytwo_2"); TestForm form = new TestForm(); Errors errors = BindUtils.bind(request,form, "form", new BindInitializer() { public void initBinder(ServletRequest request, ServletRequestDataBinder binder) { binder.registerCustomEditor(String[].class,"arrayTwo",new StringArrayPropertyEditor()); } }); assertTrue("arraytwo length", form.getArrayTwo().length == 2); } I get the following error : Testcase: testBindWithInitializer took 0.12 sec Caused an ERROR Invalid property 'arrayTwo[0]' of bean class [com.test.TestForm]: Cannot access indexed value of property referenced in indexed property path 'arrayTwo[0]': returned null org.springframework.beans.NullValueInNestedPathException: Invalid property 'arrayTwo[0]' of bean class [com.test.TestForm]: Cannot access indexed value of property referenced in indexed property path 'arrayTwo[0]': returned null at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:499) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:484) at org.springframework.beans.BeanWrapperImpl.getPropertyType(BeanWrapperImpl.java:917) at org.springframework.validation.BindException.resolveMessageCodes(BindException.java:162) at org.springframework.validation.DataBinder.bind(DataBinder.java:229) at org.springframework.web.bind.ServletRequestDataBinder.bind(ServletRequestDataBinder.java:92) at org.springframework.web.bind.BindUtils.bind(BindUtils.java:65) at com.test.TestMail.testBindWithInitializer(TestMail.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.extensions.TestSetup.run(TestSetup.java:23) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:377) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
    via by Shishir K Singh,
  • Not sure if this is abug or I am doing something wrong: public class TestForm { private Boolean testBoolean; private String[] arrayOne; private String[] arrayTwo; public TestForm() {} public String[] getArrayOne() { return this.arrayOne; } public void setArrayOne(String[] arrayOne) { this.arrayOne = arrayOne; } public String[] getArrayTwo() { return this.arrayTwo; } public void setArrayTwo(String[] arrayTwo) { this.arrayTwo = arrayTwo; } public Boolean getTestBoolean() { return this.testBoolean; } public void setTestBoolean(Boolean testBoolean) { this.testBoolean = testBoolean; } } --------------------------------------------- And my test case is : --------------------------------------------- public void testBindWithInitializer() throws ServletException { ServletContext sc = new MockServletContext(); MockHttpServletRequest request = new MockHttpServletRequest(sc); request.addParameter("testBoolean", "true"); request.addParameter("arrayTwo", "arraytwo_1,arraytwo_2"); TestForm form = new TestForm(); Errors errors = BindUtils.bind(request,form, "form", new BindInitializer() { public void initBinder(ServletRequest request, ServletRequestDataBinder binder) { binder.registerCustomEditor(String[].class,"arrayTwo",new StringArrayPropertyEditor()); } }); assertTrue("arraytwo length", form.getArrayTwo().length == 2); } I get the following error : Testcase: testBindWithInitializer took 0.12 sec Caused an ERROR Invalid property 'arrayTwo[0]' of bean class [com.test.TestForm]: Cannot access indexed value of property referenced in indexed property path 'arrayTwo[0]': returned null org.springframework.beans.NullValueInNestedPathException: Invalid property 'arrayTwo[0]' of bean class [com.test.TestForm]: Cannot access indexed value of property referenced in indexed property path 'arrayTwo[0]': returned null at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:499) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:484) at org.springframework.beans.BeanWrapperImpl.getPropertyType(BeanWrapperImpl.java:917) at org.springframework.validation.BindException.resolveMessageCodes(BindException.java:162) at org.springframework.validation.DataBinder.bind(DataBinder.java:229) at org.springframework.web.bind.ServletRequestDataBinder.bind(ServletRequestDataBinder.java:92) at org.springframework.web.bind.BindUtils.bind(BindUtils.java:65) at com.test.TestMail.testBindWithInitializer(TestMail.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at junit.extensions.TestDecorator.basicRun(TestDecorator.java:22) at junit.extensions.TestSetup$1.protect(TestSetup.java:19) at junit.extensions.TestSetup.run(TestSetup.java:23) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:377) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
    via by Shishir K Singh,
    • org.springframework.beans.InvalidPropertyException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Illegal attempt to get property 'applicationInfoList' threw exception; nested exception is org.springframework.beans.NullValueInNestedPathException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Cannot access indexed value of property referenced in indexed property path 'applicationInfoList[0]': returned null at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:826) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:555) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:532) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:904) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:76) at org.springframework.validation.DataBinder.applyPropertyValues(DataBinder.java:673) at org.springframework.validation.DataBinder.doBind(DataBinder.java:569) at org.springframework.web.bind.WebDataBinder.doBind(WebDataBinder.java:191) at org.springframework.web.bind.ServletRequestDataBinder.bind(ServletRequestDataBinder.java:110) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodInvoker.doBind(AnnotationMethodHandlerAdapter.java:734) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doBind(HandlerMethodInvoker.java:815) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.resolveHandlerArguments(HandlerMethodInvoker.java:359) at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:171) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:427) at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:415) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:788) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:717) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) Caused by: org.springframework.beans.NullValueInNestedPathException: Invalid property 'applicationInfoList[0]' of bean class [org.test.model.ApplicationForm]: Cannot access indexed value of property referenced in indexed property path 'applicationInfoList[0]': returned null at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:744) ... 32 more

    Users with the same issue

    Unknown visitor1 times, last one,