apache / apache/incubator-seata-samples

seata-samples-dubbo启动报错

Open
#575 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.4k
Forks
2k
PR merge metrics
No merged PRs in 30d

Description

启动DubboStockServiceStarter报错:
Caused by: java.lang.NoSuchMethodError: org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.setClassValuesAsString(Z)V
at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.(ReferenceAnnotationBeanPostProcessor.java:106)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)
... 15 more
查询资料后升级spring-context-support版本为:1.0.11后不报错。
但是出现了新的报错:
Caused by: java.lang.NoClassDefFoundError: com/alibaba/nacos/api/exception/NacosException
at io.seata.config.nacos.NacosConfigurationProvider.provide(NacosConfigurationProvider.java:29)
at io.seata.config.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:131)
at io.seata.config.ConfigurationFactory.getInstance(ConfigurationFactory.java:94)
at io.seata.spring.annotation.GlobalTransactionScanner.(GlobalTransactionScanner.java:87)
at io.seata.spring.annotation.GlobalTransactionScanner.(GlobalTransactionScanner.java:132)
at io.seata.spring.annotation.GlobalTransactionScanner.(GlobalTransactionScanner.java:121)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:172)
... 17 more
Caused by: java.lang.ClassNotFoundException: com.alibaba.nacos.api.exception.NacosException
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 28 more****

不知道从哪儿下手了。。。

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure when starting DubboStockServiceStarter and inspect the dependency versions involved in ReferenceAnnotationBeanPostProcessor and NacosConfigurationProvider. Check why spring-context-support 1.0.11 changes the failure to a missing NacosException, then verify that the sample starts without either linkage or class-not-found error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.