The main cause is the Tomcat server. xml configuration problem.
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false"> <Context docBase="/logstat" path="" reloadable="true" source="org.eclipse.jst.jee.server:logstat"/>
In
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
The project in webapps is automatically queried and released.
<Context docBase="/logstat" path="" reloadable="true" source="org.eclipse.jst.jee.server:logstat"/>
If the project loading path is defined again, the project will be loaded again, causing the project to be initialized twice. If the quartz scheduled task is specified, it will be executed twice.
Docbase: Project path
Path: the access path after the project is released. If this parameter is set to null, the project name does not need to be added during access and the domain name is used for direct access.
Solution:
1. the autodeploy attribute value is set to false. If this parameter is set to true, it indicates that the Tomcat service is running and can monitor files under appbase. If a new Web application is added, the Web application is automatically released. If it is set to false, no.
2. Add deployonstartup = "false", indicating that all web applications under the appbase directory will not be automatically published when the Tomcat server is started. In this way, when Tomcat is started, apps under appbase will not be automatically published, and apps under appbase will not be automatically published after startup.
Tomcat quartz is triggered twice