开发者

mvn tomcat:run terminates

When I call 'mvn开发者_StackOverflow中文版 tomcat:run' from my project, it starts up, then closes down immediately after a successful startup:

2011-01-18 13:02:10,636 INFO [org.springframework.web.servlet.DispatcherServlet] - FrameworkServlet 'myProject': initialization completed in 2010 ms
Jan 18, 2011 1:02:10 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 18, 2011 1:02:10 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4 minutes 26 seconds
[INFO] Finished at: Tue Jan 18 13:02:10 CET 2011
[INFO] Final Memory: 146M/274M
[INFO] ------------------------------------------------------------------------
2011-01-18 13:02:11,645 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Closing WebApplicationContext for namespace 'myProjectWS-servlet': startup date [Tue Jan 18 13:02:06 CET 2011]; parent: Root WebApplicationContext

Even running tomcat:run-war-only gives the same:

[INFO] Running war on http://localhost:8080/myProject
[INFO] Creating Tomcat server configuration at /Users/niklas/Documents/Eclipse/myProject/target/tomcat
Jan 18, 2011 1:19:21 PM org.apache.catalina.startup.Embedded start
INFO: Starting tomcat server
Jan 18, 2011 1:19:21 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.29
Jan 18, 2011 1:19:22 PM org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'myProject-SNAPSHOT' = [/Users/niklas/Documents/Eclipse/myProject/target/myProject-4.1.0-SNAPSHOT/]
Jan 18, 2011 1:19:22 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [/Users/niklas/Documents/Eclipse/myProject/target/myProject-4.1.0-SNAPSHOT/WEB-INF/classes/log4j.properties]
Jan 18, 2011 1:19:22 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
Jan 18, 2011 1:22:05 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'myProjectWS'
Jan 18, 2011 1:22:06 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'myProject'
Jan 18, 2011 1:22:08 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jan 18, 2011 1:22:08 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 56 seconds
[INFO] Finished at: Tue Jan 18 13:22:08 CET 2011
[INFO] Final Memory: 120M/226M
[INFO] ------------------------------------------------------------------------
Jan 18, 2011 1:22:09 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080

Any idea what could cause it to shut down right away? No System.exit's anywhere in the code

Cheers

Nik


One possible reason is if fork parameter is set to true.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜