Jar file failed to load in tomcat webapps

前端 未结 4 1386
野趣味
野趣味 2021-01-31 09:33

This is what the error i got when i try to deploy maven project to tomcat

mvn tomcat7:deploy

Error :



        
4条回答
  •  独厮守ぢ
    2021-01-31 10:28

    Precise explanation by Saif asif.

    I was using gradle as the build tool. It worked for me to exclude the tomcat-servlet-api.jar which is by default provided by tomcat.

    You need to know which of your dependency is transitively adding tomcat-servlet-api.jar to the war and then exclude it using following

     compile ('your dependency goes here') {
            exclude module:'tomcat-servlet-api'
        }
    

提交回复
热议问题