java.lang.IllegalArgumentException: None of [public static java.lang.Object org.example.AopInterceptor.intercept(java.util.concurrent.Callable) throws java.lang.Exception] allows for delegation from public java.lang.String org.example.User.getName() #1765
Labels
I want to intercept the getName method in the User class,
But after running it, I get the following error:
java.lang.IllegalArgumentException: None of [public static java.lang.Object org.example.AopInterceptor.intercept(java.util.concurrent.Callable) throws java.lang.Exception] allows for delegation from public java.lang.String org.example.User.getName()
at net.bytebuddy.implementation.bind.MethodDelegationBinder$Processor.bind(MethodDelegationBinder.java:1099)
at net.bytebuddy.implementation.MethodDelegation$Appender.apply(MethodDelegation.java:1349)
at net.bytebuddy.dynamic.scaffold.TypeWriter$MethodPool$Record$ForDefinedMethod$WithBody.applyCode(TypeWriter.java:730)
at net.bytebuddy.dynamic.scaffold.TypeWriter$MethodPool$Record$ForDefinedMethod$WithBody.applyBody(TypeWriter.java:715)
at net.bytebuddy.dynamic.scaffold.TypeWriter$Default$ForInlining$WithFullProcessing$RedefinitionClassVisitor$CodePreservingMethodVisitor.visitCode(TypeWriter.java:5502)
at net.bytebuddy.jar.asm.ClassReader.readMethod(ClassReader.java:1514)
at net.bytebuddy.jar.asm.ClassReader.accept(ClassReader.java:745)
at net.bytebuddy.jar.asm.ClassReader.accept(ClassReader.java:425)
Hope to get your help
The text was updated successfully, but these errors were encountered: