Why Are Microservice Development Framework and Netty Versions Unmatched?
Symptom
During development of a microservice application, the following error is displayed:
"Caused by: java.lang.NoSuchMethodError: io.netty.handler.codec.http.websocketx.WebSocketClientHandshakerFactory.newHandshaker(Ljava/net/URI;Lio/netty/handler/codec/http/websocketx/WebSocketVersion;Ljava/lang/String;ZLio/netty/handler/codec/http/HttpHeaders;IZZJ)Lio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker;"
Possible Cause
Third-party software introduced a mismatched version dependency.
Solution
Run the mvn dependency:tree command in the development environment to view the dependency tree and check whether the microservice development framework and Netty versions are matched.
For ServiceComb 2.0.1 development framework, the matched Netty version is 4.1.45.Final.
For details about how to use Maven to manage complex dependencies, see https://servicecomb.apache.org/cn/docs/maven_dependency_management/.
Application Development FAQs
- What Are the Differences Between the Microservice and Common Application?
- How Do I Handle a Microservice Registry Failure (Java Chassis)?
- How Do I Troubleshoot Microservices Deployed on the Cloud?
- Should I Use the SDK or ServiceMesh to Build a Microservice?
- What If I Fail to Obtain a Dependency?
- What Is Service Name Duplication Check?
- Why Do I Have to Define Service Contracts?
- Why Are Microservice Development Framework and Netty Versions Unmatched?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbotmore