in my case i also encountered the same problem i had tomcat 10.1.34 running and the application was not getting deployed it was throwing 404 error then i uninstalled tomcat and installed tomcat 8.x and the problem was fixed, so basically it was a compatibility error.