incubator-seata icon indicating copy to clipboard operation
incubator-seata copied to clipboard

2.0.0+dubbo2.7.15+tcc模式消费者端报错

Open PeppaO opened this issue 11 months ago • 2 comments

  • [ ] I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

Just paste your stack trace here!

Exception in thread "main" java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.dubbo.common.bytecode.ClassGenerator$DC.prepare(io.seata.rm.tcc.api.BusinessActionContext, int) at io.seata.rm.tcc.interceptor.TccActionInterceptorHandler.lambda$parseAnnotation$0(TccActionInterceptorHandler.java:115) at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660) at io.seata.rm.tcc.interceptor.TccActionInterceptorHandler.parseAnnotation(TccActionInterceptorHandler.java:95) at io.seata.rm.tcc.interceptor.TccActionInterceptorHandler.doInvoke(TccActionInterceptorHandler.java:63) at io.seata.integration.tx.api.interceptor.handler.AbstractProxyInvocationHandler.invoke(AbstractProxyInvocationHandler.java:20) at io.seata.spring.annotation.AdapterSpringSeataInterceptor.invoke(AdapterSpringSeataInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) at org.apache.dubbo.common.bytecode.proxy0$$EnhancerBySpringCGLIB$$42e9b4b3.prepare() at io.seata.tcc.springboot.dubbo.service.TccTransactionService.doTransactionCommit(TccTransactionService.java:31) at io.seata.tcc.springboot.dubbo.service.TccTransactionService$$FastClassBySpringCGLIB$$fc4de775.invoke() at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) at io.seata.spring.annotation.AdapterInvocationWrapper.proceed(AdapterInvocationWrapper.java:41) at io.seata.integration.tx.api.interceptor.handler.GlobalTransactionalInterceptorHandler$2.execute(GlobalTransactionalInterceptorHandler.java:185) at io.seata.tm.api.TransactionalTemplate.execute(TransactionalTemplate.java:113) at io.seata.integration.tx.api.interceptor.handler.GlobalTransactionalInterceptorHandler.handleGlobalTransaction(GlobalTransactionalInterceptorHandler.java:182) at io.seata.integration.tx.api.interceptor.handler.GlobalTransactionalInterceptorHandler.doInvoke(GlobalTransactionalInterceptorHandler.java:151) at io.seata.integration.tx.api.interceptor.handler.AbstractProxyInvocationHandler.invoke(AbstractProxyInvocationHandler.java:20) at io.seata.spring.annotation.AdapterSpringSeataInterceptor.invoke(AdapterSpringSeataInterceptor.java:30) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) at io.seata.tcc.springboot.dubbo.service.TccTransactionService$$EnhancerBySpringCGLIB$$c2f8a418.doTransactionCommit() at io.seata.tcc.springboot.dubbo.starter.SpringbootTccTransactionApplication.transactionCommitDemo(SpringbootTccTransactionApplication.java:56) at io.seata.tcc.springboot.dubbo.starter.SpringbootTccTransactionApplication.main(SpringbootTccTransactionApplication.java:47) Caused by: java.lang.NoSuchMethodException: org.apache.dubbo.common.bytecode.ClassGenerator$DC.prepare(io.seata.rm.tcc.api.BusinessActionContext, int) at java.lang.Class.getMethod(Class.java:1786) at io.seata.rm.tcc.interceptor.TccActionInterceptorHandler.lambda$parseAnnotation$0(TccActionInterceptorHandler.java:107) ... 28 more

Ⅲ. Describe what you expected to happen

image image

Ⅳ. How to reproduce it (as minimally and precisely as possible)

https://gitee.com/seata-io/seata-samples/tree/master/tcc/springboot-tcc-sample

  1. xxx
  2. xxx
  3. xxx

Minimal yet complete reproducer code (or URL to code): 测试用例tcc/springboot-tcc-sample

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version(e.g. java -version): 1.8
  • Seata client/server version: 2.0.0
  • Database version:
  • OS(e.g. uname -a):
  • Others:dubbo 2.7.15

PeppaO avatar Mar 20 '24 06:03 PeppaO

Please annotate the implementation class method with the annotation.

slievrly avatar Mar 24 '24 15:03 slievrly

Please annotate the implementation class method with the annotation.

意思是不能在接口上用注解了吗, 与1.6.x有使用上的区别?同样的测试用例,测试dubbo3是没问题的

PeppaO avatar Apr 08 '24 01:04 PeppaO