Getting NoSuchMethodError:javax.servlet.ServletContext.getVirtualServerName()

前端 未结 9 1841
忘掉有多难
忘掉有多难 2020-11-28 13:03

I am facing an issue during deployment of a service in Tomcat 8. Getting following error :

Caused by: java.lang.NoSuchMethodError: javax.servlet.Ser

9条回答
  •  粉色の甜心
    2020-11-28 13:54

    Check all your Maven (or equivalent) dependencies and make sure that you - or most likely another dependency - are not pulling in a pre-3.1 version of the javax.servlet / servlet-api that may be taking precedence over what's in your Tomcat 8. If you've manually deployed, make sure you haven't manually copied any servlet-api JARs into Tomcat itself.

    See: https://stackoverflow.com/a/26232535/954442

提交回复
热议问题