title: Eclipse WST: Webapp sometimes not deployed on Tomcat
body: <p>I am using Eclipse WTP to develop my spring app and deploy it on a tomcat server.</p>
  
  <p>Usually my web app is deployed on tomcat and everything works fine, but sometimes, I could say randomly, my web app is just not deployed and tomcat starts without any modules:</p>
  
  <pre><code>17.03.2011 14:04:31 org.apache.catalina.core.AprLifecycleListener init
  INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [CUT BY ME]
  17.03.2011 14:04:31 org.apache.tomcat.util.digester.SetPropertiesRule begin
  WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:mywebapp' did not find a matching property.
  17.03.2011 14:04:31 org.apache.coyote.http11.Http11Protocol init
  INFO: Initializing Coyote HTTP/1.1 on http-8080
  17.03.2011 14:04:31 org.apache.catalina.startup.Catalina load
  INFO: Initialization processed in 573 ms
  17.03.2011 14:04:31 org.apache.catalina.core.StandardService start
  INFO: Starting service Catalina
  17.03.2011 14:04:31 org.apache.catalina.core.StandardEngine start
  INFO: Starting Servlet Engine: Apache Tomcat/6.0.26
  17.03.2011 14:04:31 org.apache.coyote.http11.Http11Protocol start
  INFO: Starting Coyote HTTP/1.1 on http-8080
  17.03.2011 14:04:31 org.apache.jk.common.ChannelSocket init
  INFO: JK: ajp13 listening on /0.0.0.0:8009
  17.03.2011 14:04:31 org.apache.jk.server.JkMain start
  INFO: Jk running ID=0 time=0/34  config=null
  17.03.2011 14:04:31 org.apache.catalina.startup.Catalina start
  INFO: Server startup in 438 ms
  </code></pre>
  
  <p>If the app is deployed I see a much longer log and the server needs a much longer time to start, so I can definately be sure that no app is deployed.</p>
  
  <p>To get rid of this problem I am currently randomly removing and adding my app again and restarting eclipse until it finally works. This is, of course, not a solution, so maybe someone has an idea why things go wrong.</p>
  
  <p>Thanks!</p>
  
  <p>EDIT: Now I found out that the problem occurs sometimes under these circumstances: I change something in a resource file (JS/HTML), the file is repusblished, but not only this file but also some class files are republished. Suddenly after this happens, not all class files are present any more and the server is missing some classes.</p>
  
  <p>Only stoppping the server, removing the app and closing eclipse works here.</p>
  
  <p>EDIT 2: I could now further go into the problem. It seems that the eclipse auto publish functionality has some problems. If I totally switch off automatic republishing and republish manually, everything works out well.</p>