java.lang.IllegalArgumentException: Child name [/mytestapp] is not unique

Sometimes while deploying war to tomcat leads to the error. 15-Jun-2021 13:41:40.282 INFO [ajp-nio-127.0.0.1-8209-exec-10] org.apache.catalina.startup.HostConfig.undeploy Undeploying context [/mytestapp] 15-Jun-2021 13:41:40.956 INFO [ajp-nio-127.0.0.1-8209-exec-10] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/mytestapp.war] 15-Jun-2021 13:41:40.963 INFO [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive [/opt/tomcat/webapps/mytestapp.war] 15-Jun-2021 13:41:40.964 SEVERE [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/opt/tomcat/webapps/mytestapp.war] java.lang.IllegalArgumentException: Child name [/mytestapp] is not … Read more