java.lang.NullPointerException

Hibernate JIRA | Louis Burton | 4 years ago
  1. 0

    This has been spawned from a forum posting. If a bean validated with the _MethodValidationInterceptor_ has two methods with the same name that are prefixed with get/has/is, calling one of these methods will result in a _NullPointerException_. {noformat} java.lang.NullPointerException at org.hibernate.validator.internal.engine.ValidatorImpl.validateParametersInContext(ValidatorImpl.java:846) at org.hibernate.validator.internal.engine.ValidatorImpl.validateAllParameters(ValidatorImpl.java:218) at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:88) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) {noformat} Code snippet example: Problem experienced when calling following methods on method validated bean. {code} ValidatedObject getMyValidObject(arg1); ValidatedObject getMyValidObject(arg1, arg2); {code} Workaround: {code} ValidatedObject retrieveMyValidObject(arg1); ValidatedObject retrieveMyValidObject(arg1, arg2); {code} or: {code} ValidatedObject getMyValidObject(arg1); ValidatedObject getMyValidObjectDifferentMethodName(arg1, arg2); {code} I'm not aware of a workaround that doesn't involve having to change the interface! A detailed description with some code references is available here: https://forum.hibernate.org/viewtopic.php?f=9&t=1016470&p=2456768#p2456768

    Hibernate JIRA | 4 years ago | Louis Burton
    java.lang.NullPointerException
  2. 0

    This has been spawned from a forum posting. If a bean validated with the _MethodValidationInterceptor_ has two methods with the same name that are prefixed with get/has/is, calling one of these methods will result in a _NullPointerException_. {noformat} java.lang.NullPointerException at org.hibernate.validator.internal.engine.ValidatorImpl.validateParametersInContext(ValidatorImpl.java:846) at org.hibernate.validator.internal.engine.ValidatorImpl.validateAllParameters(ValidatorImpl.java:218) at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:88) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) {noformat} Code snippet example: Problem experienced when calling following methods on method validated bean. {code} ValidatedObject getMyValidObject(arg1); ValidatedObject getMyValidObject(arg1, arg2); {code} Workaround: {code} ValidatedObject retrieveMyValidObject(arg1); ValidatedObject retrieveMyValidObject(arg1, arg2); {code} or: {code} ValidatedObject getMyValidObject(arg1); ValidatedObject getMyValidObjectDifferentMethodName(arg1, arg2); {code} I'm not aware of a workaround that doesn't involve having to change the interface! A detailed description with some code references is available here: https://forum.hibernate.org/viewtopic.php?f=9&t=1016470&p=2456768#p2456768

    Hibernate JIRA | 4 years ago | Louis Burton
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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.NullPointerException

      No message provided

      at org.hibernate.validator.internal.engine.ValidatorImpl.validateParametersInContext()
    2. Hibernate Validator Engine
      ValidatorImpl.validateAllParameters
      1. org.hibernate.validator.internal.engine.ValidatorImpl.validateParametersInContext(ValidatorImpl.java:846)
      2. org.hibernate.validator.internal.engine.ValidatorImpl.validateAllParameters(ValidatorImpl.java:218)
      2 frames
    3. Spring Context
      MethodValidationInterceptor.invoke
      1. org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:88)
      1 frame
    4. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      2. org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      4. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      4 frames