org.springframework.beans.NullValueInNestedPathException: Invalid property 'deal.client' of bean class [com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.actions.PlDealsDealFormBean]: Value of nested property 'deal.client' is null

Spring JIRA | Sergey Ponomarev | 9 years ago
  1. 0

    I use the following validation rules: {deal: ? not null : 'deal' : 'errors.required.deal' : 101} {deal.client: ? not null : 'deal client' : 'errors.required.deal.client' : 102} I have deal != null and deal.client ==null. The second rule have to find this issue and add error into collection. But, i get the following error: org.springframework.beans.NullValueInNestedPathException: Invalid property 'deal.client' of bean class [com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.actions.PlDealsDealFormBean]: Value of nested property 'deal.client' is null at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:387) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:362) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:363) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:468) at org.springmodules.validation.valang.functions.BeanPropertyFunction.getResult(BeanPropertyFunction.java:59) at org.springmodules.validation.valang.predicates.GenericTestPredicate.evaluate(GenericTestPredicate.java:60) at org.springmodules.validation.valang.predicates.BasicValidationRule.validate(BasicValidationRule.java:124) at org.springmodules.validation.valang.ValangValidator.validate(ValangValidator.java:194) at com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.PlDealsEditValidationTest.testMandatoryFields(PlDealsEditValidationTest.java:36) ... In my opinion you must catch this exception and pass null value into parser. Note, that in general i can't use standalone validator for standalone objects as rules are generally interconnected between objects tree.

    Spring JIRA | 9 years ago | Sergey Ponomarev
    org.springframework.beans.NullValueInNestedPathException: Invalid property 'deal.client' of bean class [com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.actions.PlDealsDealFormBean]: Value of nested property 'deal.client' is null
  2. 0

    I use the following validation rules: {deal: ? not null : 'deal' : 'errors.required.deal' : 101} {deal.client: ? not null : 'deal client' : 'errors.required.deal.client' : 102} I have deal != null and deal.client ==null. The second rule have to find this issue and add error into collection. But, i get the following error: org.springframework.beans.NullValueInNestedPathException: Invalid property 'deal.client' of bean class [com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.actions.PlDealsDealFormBean]: Value of nested property 'deal.client' is null at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:387) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:362) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:363) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:468) at org.springmodules.validation.valang.functions.BeanPropertyFunction.getResult(BeanPropertyFunction.java:59) at org.springmodules.validation.valang.predicates.GenericTestPredicate.evaluate(GenericTestPredicate.java:60) at org.springmodules.validation.valang.predicates.BasicValidationRule.validate(BasicValidationRule.java:124) at org.springmodules.validation.valang.ValangValidator.validate(ValangValidator.java:194) at com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.PlDealsEditValidationTest.testMandatoryFields(PlDealsEditValidationTest.java:36) ... In my opinion you must catch this exception and pass null value into parser. Note, that in general i can't use standalone validator for standalone objects as rules are generally interconnected between objects tree.

    Spring JIRA | 9 years ago | Sergey Ponomarev
    org.springframework.beans.NullValueInNestedPathException: Invalid property 'deal.client' of bean class [com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.actions.PlDealsDealFormBean]: Value of nested property 'deal.client' is null
  3. 0

    Spring MVC/Hibernate - NullValueInNestedPathException, Invalid property, value of nested property is null?

    Stack Overflow | 3 years ago | Joshua
    org.springframework.beans.NullValueInNestedPathException: Invalid property 'empCalList[0].shiftAssignmentVO' of bean class [com.safeway.dtr.employee.vo.EmpCalManager]: Value of nested property 'empCalList[0].shiftAssignmentVO' is null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    It seems that a Backing Bean (formObject) for a FormAction can't handle nested properties. I have a formObject with 2 references to Address objects (homeAddress and workAddress). They are set to new Address instances via the Constuctor of the formObject. When I debug, I see that the formObject is well instanciated via the createFormObject(context); in the FormAction class. Via Inspect I also saw that both address properties where pointing to Address objects. All very good. But when the view is processed I get this error: org.springframework.beans.NullValueInNestedPathException: Invalid property 'homeAddress' of bean class [my.company.web.action.LiteratureFormAction$FormObject]: Value of nested property 'homeAddress' is null at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:443) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:418) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:524) at org.springframework.validation.AbstractPropertyBindingResult.getActualFieldValue(AbstractPropertyBindingResult.java:77) at org.springframework.validation.AbstractBindingResult.getFieldValue(AbstractBindingResult.java:337) at org.springframework.validation.BindException.getFieldValue(BindException.java:206) at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:117) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:179) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.resolveCssClass(AbstractHtmlElementTag.java:404) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:380) at org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag.writeDefaultAttributes(AbstractHtmlInputElementTag.java:177) at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:139) at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:93) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:77) at jsp_servlet._pages._requestmaterial.__form._jspService(__form.java:770) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:97) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166) at org.acegisecurity.util.FilterChainProxy$VirtualFilter

    Spring JIRA | 9 years ago | Bert Van der Heyden
    org.springframework.beans.NullValueInNestedPathException: Invalid property 'homeAddress' of bean class [my.company.web.action.LiteratureFormAction$FormObject]: Value of nested property 'homeAddress' is null
  6. 0

    It seems that a Backing Bean (formObject) for a FormAction can't handle nested properties. I have a formObject with 2 references to Address objects (homeAddress and workAddress). They are set to new Address instances via the Constuctor of the formObject. When I debug, I see that the formObject is well instanciated via the createFormObject(context); in the FormAction class. Via Inspect I also saw that both address properties where pointing to Address objects. All very good. But when the view is processed I get this error: org.springframework.beans.NullValueInNestedPathException: Invalid property 'homeAddress' of bean class [my.company.web.action.LiteratureFormAction$FormObject]: Value of nested property 'homeAddress' is null at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:443) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:418) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:524) at org.springframework.validation.AbstractPropertyBindingResult.getActualFieldValue(AbstractPropertyBindingResult.java:77) at org.springframework.validation.AbstractBindingResult.getFieldValue(AbstractBindingResult.java:337) at org.springframework.validation.BindException.getFieldValue(BindException.java:206) at org.springframework.web.servlet.support.BindStatus.<init>(BindStatus.java:117) at org.springframework.web.servlet.tags.form.AbstractDataBoundFormElementTag.getBindStatus(AbstractDataBoundFormElementTag.java:179) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.resolveCssClass(AbstractHtmlElementTag.java:404) at org.springframework.web.servlet.tags.form.AbstractHtmlElementTag.writeDefaultAttributes(AbstractHtmlElementTag.java:380) at org.springframework.web.servlet.tags.form.AbstractHtmlInputElementTag.writeDefaultAttributes(AbstractHtmlInputElementTag.java:177) at org.springframework.web.servlet.tags.form.InputTag.writeTagContent(InputTag.java:139) at org.springframework.web.servlet.tags.form.AbstractFormTag.doStartTagInternal(AbstractFormTag.java:93) at org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:77) at jsp_servlet._pages._requestmaterial.__form._jspService(__form.java:770) at weblogic.servlet.jsp.JspBase.service(JspBase.java:33) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:463) at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28) at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:70) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:97) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166) at org.acegisecurity.util.FilterChainProxy$VirtualFilter

    Spring JIRA | 9 years ago | Bert Van der Heyden
    org.springframework.beans.NullValueInNestedPathException: Invalid property 'homeAddress' of bean class [my.company.web.action.LiteratureFormAction$FormObject]: Value of nested property 'homeAddress' is null

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.springframework.beans.NullValueInNestedPathException

      Invalid property 'deal.client' of bean class [com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.actions.PlDealsDealFormBean]: Value of nested property 'deal.client' is null

      at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper()
    2. Spring Beans
      BeanWrapperImpl.getPropertyValue
      1. org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:387)
      2. org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:362)
      3. org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:363)
      4. org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:468)
      4 frames
    3. org.springmodules.validation
      ValangValidator.validate
      1. org.springmodules.validation.valang.functions.BeanPropertyFunction.getResult(BeanPropertyFunction.java:59)
      2. org.springmodules.validation.valang.predicates.GenericTestPredicate.evaluate(GenericTestPredicate.java:60)
      3. org.springmodules.validation.valang.predicates.BasicValidationRule.validate(BasicValidationRule.java:124)
      4. org.springmodules.validation.valang.ValangValidator.validate(ValangValidator.java:194)
      4 frames
    4. com.db.gcf
      PlDealsEditValidationTest.testMandatoryFields
      1. com.db.gcf.gbcrm.pipelinedeals.pipelinedeals.web.webflows.PlDealsEditValidationTest.testMandatoryFields(PlDealsEditValidationTest.java:36)
      1 frame