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

client调用报错 #45

Open
bobmax88 opened this issue May 23, 2022 · 10 comments
Open

client调用报错 #45

bobmax88 opened this issue May 23, 2022 · 10 comments

Comments

@bobmax88
Copy link

请问这是哪里设置的问题吗?调用client的任何方法都报这个错
Exception in thread "main" java.lang.UnsupportedOperationException
at com.baidu.xuper.pb.XchainOuterClass$Header.dynamicMethod(XchainOuterClass.java:1451)
at com.google.protobuf.GeneratedMessageLite.dynamicMethod(GeneratedMessageLite.java:336)
at com.google.protobuf.GeneratedMessageLite.isInitialized(GeneratedMessageLite.java:1514)
at com.google.protobuf.GeneratedMessageLite.isInitialized(GeneratedMessageLite.java:258)
at com.google.protobuf.GeneratedMessageLite$Builder.build(GeneratedMessageLite.java:433)
at com.baidu.xuper.api.Common.newHeader(Common.java:9)
at com.baidu.xuper.api.XuperClient.getSystemStatus(XuperClient.java:291)

@superlitian
Copy link

哪个版本的SDK? 包含调用上下文的代码可以截图一下吗?

@bobmax88
Copy link
Author

sdk版本0.2.0
image

@superlitian
Copy link

是使用maven 集成的吗?

@bobmax88
Copy link
Author

是的,maven集成的
image

@superlitian
Copy link

好的,看你的节点链接的是开放网络, 这个问题是必现的吗? 是否有重试过?

@bobmax88
Copy link
Author

是必现的,client的任何一个方法都报这个错误,我看配置文件应该也没什么问题,config里面的值我可以获取到

@superlitian
Copy link

好的, 可以配置为 0.2.1 版本的SDK试下

@bobmax88
Copy link
Author

配置了0.2.1报错变成了java.lang.NoSuchMethodError: com.google.protobuf.Descriptors和io.grpc.StatusRuntimeException: CANCELLED: Failed to read message.

@bobmax88
Copy link
Author

引入依赖包之后不报错了,感谢感谢

@superlitian
Copy link

不客气

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants