wxrqforever commented on issue #7047: URL: https://github.com/apache/incubator-seata/issues/7047#issuecomment-2564985355
> 你可以提供一个稳定复现的最小demo吗? > Can you provide a stable reproduced minimum demo? @funky-eyes 最小可复现的demo已提交 https://github.com/wxrqforever/localTccDemo 我这里本周有些关于这个问题进展,同步一下。 我在完成最小可复现demo时,即一个纯spring-cloud项目后发现无法复现上面提到的报错"java.lang.RuntimeException: java.lang.NoSuchMethodException: org.springframework.aop.SpringProxy.prepare(org.apache.seata.rm.tcc.api.BusinessActionContext, int) " 然后我debug对比这个demo和业务代码,发现导致这个异常的原因是,业务中有一个自定义的aop生效了,这个我也提交到demo里了 <img width="621" alt="image" src="https://github.com/user-attachments/assets/31e0771c-82dc-4851-a589-569ba3c1fdd4" /> 在这种情况下,debug可以看到: 断点1: org.apache.seata.rm.tcc.interceptor.TccActionInterceptorHandler 这里的targetBean是动态代理增强后的类 <img width="882" alt="image" src="https://github.com/user-attachments/assets/14eaf9c9-3679-4ccb-a3f5-3fccbc6ff329" /> 断点2:org.apache.seata.rm.tcc.interceptor.TccActionInterceptorHandler#parseAnnotation 这里拿到的interfaceClasses就包含有动态代理相关的接口,如果没有这个aop这里实际只有interface org.example.biz.LocalTccService,那么就是符合预期。 <img width="907" alt="image" src="https://github.com/user-attachments/assets/cfda5754-4b9d-4c24-a3cb-35dbf7e25a12" /> 这里这段判断代码我有个疑问,在for循环里发现后NoSuchMethodException就抛出异常中断,那这里为什么要是一个循环,是存在什么场景能够到下一次循环而不触发这个异常吗?这里是否可以考虑,改成只要找到目标method的就可以,而不是必须都存在。 以上,期待您的建议 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org