Closed morisenmen closed 3 years ago
i have the same problem
java.lang.NoSuchMethodError: org.apache.catalina.connector.Connector.setProtocol(Ljava/lang/String;)V
at com.alibaba.dubbo.remoting.http.tomcat.TomcatHttpServer.
In TomcatHttpServer. The Code is not compatible could fix with this way
// tomcat.getConnector().setProtocol("org.apache.coyote.http11.Http11NioProtocol");
Context context = tomcat.addContext("/", baseDir);
Tomcat.addServlet(context, "dispatcher", new DispatcherServlet());
context.addServletMappingDecoded("/*", "dispatcher");
Protoco org.apache.coyote.http11.Http11NioProtocol
in tomcat 9.This is default config,so it is not necessary.And ServletMapping set method is addServletMappingDecoded.
Please try upgrade to Dubbo 2.7.
I have checked the FAQ of this repository and believe that this is not a duplicate.
Environment
nacos-spring-boot-starter:0.2.1 spring-boot-starter:2.1.x dubbo:2.6.5
Expected Result
This problem is that spring-boot-2.1.x use tomcat-embed 9.x.And in that version has no Connector.setProtocol in it.