I have two applications running under the same server with the same port: http://localhost:8080/app1 http://localhost:8080/app2 I installed Tomcat7 as a windows service, when I try to running it, Tomcat hangs and stops by it self with an error message in Windows events "The Apache Tomcat 7.0 Tomcat7 service terminated with service-specific error Incorrect function" When I removed one of these two applications from webapps folder( App1 or App2), Tomcat service runs smoothly without a problem.
Another condition, when I start tomcat with cmd (the two applications are in the webapps folder) the web server runs without a problem too.
I need Tomcat to start automatically with Windows services.
The question is why Tomcat service stops running with two deployed applications? Why does it accept only one application?
PS: I tried to modify the tomcat7w.exe (the min and max memory) and changing the jdk version. Nothing works.
Thanks for your help.

log/catalina.logwhen the problem occurs? - Andrew Lygin