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

springcloud-nacos-seata启动报错:no available service 'null' found, please make sure registry config correct

Open zichen1019 opened this issue 5 years ago • 0 comments

readme文件中seata版本为0.8.0,但是内部却说是升级到了1.1.0版本,结果pom中却同时引入了io.seata:seata-all:1.1.0、io.seata:seata-all:1.3.0两个版本。

原因为:com.alibaba.cloud:spring-cloud-alibaba-seata:2.1.0.RELEASE 含有io.seata:seata-all:1.3.0版本,又引入了io.seata:seata-all:1.1.0版本,导致存在了两个版本

pom文件seata部分应修改如下 以下为对应seata 1.1.0版本 ps. 如果seata版本是1.1.0,那么io.seata:seata-all的版本即为1.1.0,否则将报错:no available service 'null' found, please make sure registry config correct

<!-- seata-->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-alibaba-seata</artifactId>
            <version>2.1.0.RELEASE</version>
            <exclusions>
                <exclusion>
                    <groupId>io.seata</groupId>
                    <artifactId>seata-all</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.seata</groupId>
            <artifactId>seata-all</artifactId>
            <version>1.1.0</version>
        </dependency>

... 最后真心难受,之前一直未能找到错误,这个问题拖了我好久,我觉得偏官方的例子,不应该这么大漏洞吧,一直以为是我自己的原因,差点就放弃了seata,唉,最后终于找到问题所在。

zichen1019 avatar Aug 10 '20 10:08 zichen1019