Jetty:run fails with NoSuchMethodError with Spring 5

后端 未结 2 1271
渐次进展
渐次进展 2021-01-21 12:56

I am trying to update my web application to current libraries. When I upgraded Spring from 3.1.1 to 5.0.0 it started to fail with:

java.lang.NoSuchMethodError: j         


        
2条回答
  •  迷失自我
    2021-01-21 13:11

    Spring 5 requires a Servlet 3.1 container as a bare minimum however as you are using Jetty 6.1 which is (at most) a Servlet 2.5 container. So that is obviously not going to work.

    You will have to upgrade your Jetty version. To upgrade instead of the maven-jetty-plugin you will need to use the appropriate jetty-maven-plugin (the name has changed) and it is part of Eclipse now.

    9.4.7.v20170914
    
    
        org.eclipse.jetty
        jetty-maven-plugin
        ${maven-jetty-plugin.version}
    
    

    This should use the latest version of both the plugin and thus Jetty.

提交回复
热议问题