Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nacos服务存在jar包冲突,启动服务连接不到nacos,nacos后台报错NoSuchMethodError #12110

Open
doutd opened this issue May 16, 2024 · 1 comment
Labels
kind/question Category issues related to questions or problems

Comments

@doutd
Copy link

doutd commented May 16, 2024

nacos2.2.0版本,nacos能正常启动,浏览器访问正常,但是在ide中启动服务连接不到nacos,nacos后台报错NoSuchMethodError,排查发现nacos的jar包中nacos下边的jar包,nacos-client里边包含nacos-api和nacos-common这两个jar包里的类,路径和类名都一样,报错也是这里面的类报的,这个要怎么解决

Tell us your environment

Windows11,idea2024.1.1,nacos2.2.0

Anything else we need to know?

两个jar包里同一个类下的方法参数不一样
lQLPJwobXDxEB0XM9c0EWbC11-D0lVggQQYxYp8QT20A_1113_245
lQLPJwQ9yPOyNoXNATnNA36w1OiIoJHgVDgGMWKFRPMxAA_894_313
lQLPKHdBOeY8JoXNAS3NBEaweM9NPRwNwmYGMWKFRPMxAQ_1094_301

@doutd doutd changed the title 在ide中启动服务连接不到nacos,nacos后台报错NoSuchMethodError nacos服务存在jar包冲突,在ide中启动服务连接不到nacos,nacos后台报错NoSuchMethodError May 16, 2024
@doutd doutd changed the title nacos服务存在jar包冲突,在ide中启动服务连接不到nacos,nacos后台报错NoSuchMethodError nacos服务存在jar包冲突,启动服务连接不到nacos,nacos后台报错NoSuchMethodError May 23, 2024
@KomachiSion
Copy link
Collaborator

https://nacos.io/docs/latest/guide/user/sdk/#_top

nacos-client会自带api和common, 不需要额外引入, 如果额外引入,可能因为包名问题导致冲突。

只有在使用pure 纯净版客户端时才需要引入api和common

@KomachiSion KomachiSion added the kind/question Category issues related to questions or problems label May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/question Category issues related to questions or problems
Projects
None yet
Development

No branches or pull requests

2 participants