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

前端 未结 9 1836
忘掉有多难
忘掉有多难 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:57

    Solved On my mac with java 8 was facing issue with downloaded tomcat from site and unzip.

    My issue got solved because there was a extra servlet-api.jar file which was getting picked up. It was coming from /Library/Java/Extensions/servlet-api.jar

    For finding it in your system you can use sudo find / -name servlet-api.jar

    Removed it by backing it up somewhere else.

    I was following this for intallation https://gist.github.com/ddanailov-nmdp/c97aba2ca926b9627f6b4f7174083a32

提交回复
热议问题