Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15807

Follow-up: AbstractMethodError when calling validated method of MethodValidationPostProcessor is using a @Lazy validator

    Details

      Description

      This problem was originally reported in SPR-15629 and marked as fixed in 4.3.9. However, the problem still occurs with both 4.3.9 and 4.3.10. It can be reproduced using the sample from SPR-15629. The failure is, I believe, unchanged from when the problem was originally reported against 4.3.8.

      For reference here's the failure with 4.3.9:

      Exception in thread "main" java.lang.AbstractMethodError: org.springframework.validation.beanvalidation.CustomValidatorBean.forExecutables()Ljavax/validation/executable/ExecutableValidator;
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      	at com.sun.proxy.$Proxy9.forExecutables(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216)
      	at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:201)
      	at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
      	at com.example.LazyValidatorProblem$SampleService$$EnhancerBySpringCGLIB$$bcae8912.doSomething(<generated>)
      	at com.example.LazyValidatorProblem.main(LazyValidatorProblem.java:62)
      

      And with 4.3.10:

      Exception in thread "main" java.lang.AbstractMethodError: org.springframework.validation.beanvalidation.CustomValidatorBean.forExecutables()Ljavax/validation/executable/ExecutableValidator;
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
      	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
      	at com.sun.proxy.$Proxy9.forExecutables(Unknown Source)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:216)
      	at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:201)
      	at org.springframework.validation.beanvalidation.MethodValidationInterceptor.invoke(MethodValidationInterceptor.java:119)
      	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
      	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:673)
      	at com.example.LazyValidatorProblem$SampleService$$EnhancerBySpringCGLIB$$bcae8912.doSomething(<generated>)
      	at com.example.LazyValidatorProblem.main(LazyValidatorProblem.java:61)
      

        Issue Links

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              juergen.hoeller Juergen Hoeller
              Reporter:
              awilkinson Andy Wilkinson
              Last updater:
              St├ęphane Nicoll
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                9 weeks, 1 day ago