Help Center/ ServiceStage/ FAQs/ Application Development/ Why Are Microservice Development Framework and Netty Versions Mismatched?
Updated on 2025-08-25 GMT+08:00

Why Are Microservice Development Framework and Netty Versions Mismatched?

Symptom

Development of a microservice application returned the following error message:

"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 versions.

For ServiceComb 2.0.1 development framework, the matching 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/.