java.lang.IllegalStateException: JSR-303 validated property 'client.application' does not have a corresponding accessor for Spring data binding - check your DataBinder's configuration (bean property versus direct field access)

Stack Overflow | ST-DDT | 3 months ago
  1. 0

    Java Spring Rest validation configure property access

    Stack Overflow | 3 months ago | ST-DDT
    java.lang.IllegalStateException: JSR-303 validated property 'client.application' does not have a corresponding accessor for Spring data binding - check your DataBinder's configuration (bean property versus direct field access)
  2. 0

    ConstraintValidatorContext stores previous nodes when it shouldn't

    Stack Overflow | 4 years ago | Hartimer
    java.lang.IllegalStateException: JSR-303 validated property 'fieldA.fieldB' does not have a corresponding accessor for Spring data binding - check your DataBinder's configuration (bean property versus direct field access)
  3. 0

    Binding and validation work fine for nested fields even without getters and setters, but an exception is thrown when validation constraints are not met for nested fields. In this case when nested.number is greater than 5. {code:java} public class JavaBean { @Valid public NestedJavaBean nested; @Max(5) public Integer number; } public class NestedJavaBean { @NotNull @Max(5) public Integer number; } {code} {noformat} java.lang.IllegalStateException: JSR-303 validated property 'nested.number' does not have a corresponding accessor for Spring data binding - check your DataBinder's configuration (bean property versus direct field access) at org.springframework.validation.beanvalidation.SpringValidatorAdapter.processConstraintViolations(SpringValidatorAdapter.java:158) at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:107) at org.springframework.validation.DataBinder.validate(DataBinder.java:781) at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.validateIfApplicable(AbstractMessageConverterMethodArgumentResolver.java:188) at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:104) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:77) .... Caused by: org.springframework.beans.NotReadablePropertyException: Invalid property 'nested' of bean class [org.springframework.samples.mvc.messageconverters.JavaBean]: Bean property 'nested' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:731) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:572) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:549) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:720) at org.springframework.validation.AbstractPropertyBindingResult.getActualFieldValue(AbstractPropertyBindingResult.java:99) at org.springframework.validation.AbstractBindingResult.getRawFieldValue(AbstractBindingResult.java:283) at org.springframework.validation.beanvalidation.SpringValidatorAdapter.processConstraintViolations(SpringValidatorAdapter.java:143) {noformat}

    Spring JIRA | 1 year ago | Tapio Koskinen
    java.lang.IllegalStateException: JSR-303 validated property 'nested.number' does not have a corresponding accessor for Spring data binding - check your DataBinder's configuration (bean property versus direct field access)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Binding and validation work fine for nested fields even without getters and setters, but an exception is thrown when validation constraints are not met for nested fields. In this case when nested.number is greater than 5. {code:java} public class JavaBean { @Valid public NestedJavaBean nested; @Max(5) public Integer number; } public class NestedJavaBean { @NotNull @Max(5) public Integer number; } {code} {noformat} java.lang.IllegalStateException: JSR-303 validated property 'nested.number' does not have a corresponding accessor for Spring data binding - check your DataBinder's configuration (bean property versus direct field access) at org.springframework.validation.beanvalidation.SpringValidatorAdapter.processConstraintViolations(SpringValidatorAdapter.java:158) at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:107) at org.springframework.validation.DataBinder.validate(DataBinder.java:781) at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodArgumentResolver.validateIfApplicable(AbstractMessageConverterMethodArgumentResolver.java:188) at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.resolveArgument(RequestResponseBodyMethodProcessor.java:104) at org.springframework.web.method.support.HandlerMethodArgumentResolverComposite.resolveArgument(HandlerMethodArgumentResolverComposite.java:77) .... Caused by: org.springframework.beans.NotReadablePropertyException: Invalid property 'nested' of bean class [org.springframework.samples.mvc.messageconverters.JavaBean]: Bean property 'nested' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:731) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:572) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:549) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:720) at org.springframework.validation.AbstractPropertyBindingResult.getActualFieldValue(AbstractPropertyBindingResult.java:99) at org.springframework.validation.AbstractBindingResult.getRawFieldValue(AbstractBindingResult.java:283) at org.springframework.validation.beanvalidation.SpringValidatorAdapter.processConstraintViolations(SpringValidatorAdapter.java:143) {noformat}

    Spring JIRA | 1 year ago | Tapio Koskinen
    java.lang.IllegalStateException: JSR-303 validated property 'nested.number' does not have a corresponding accessor for Spring data binding - check your DataBinder's configuration (bean property versus direct field access)
  6. 0

    [play-framework] [play-2.2 Java] Regression in form(foo.class).bindFromRequest()? - Grokbase

    grokbase.com | 1 year ago
    java.lang.IllegalStateException: JSR-303 validated property 'ui' does not have a corresponding accessor for data binding - check your DataBinder's configuration (bean property versus direct field access)

    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. java.lang.IllegalStateException

      JSR-303 validated property 'client.application' does not have a corresponding accessor for Spring data binding - check your DataBinder's configuration (bean property versus direct field access)

      at org.springframework.validation.beanvalidation.SpringValidatorAdapter.processConstraintViolations()
    2. Spring Context
      DataBinder.validate
      1. org.springframework.validation.beanvalidation.SpringValidatorAdapter.processConstraintViolations(SpringValidatorAdapter.java:153)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:108)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.validation.DataBinder.validate(DataBinder.java:866)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3 frames