1

Although the web app I'm working on was running perfectly fine on friday, monday morning I suddently got the jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:javax/servlet/Servlet.class" error.

After looking at the related topics, I deleted and recreated the Eclipse server instance and other several things, and finally just added <scope>provided</scope> to the pom.xml which worked. It now looks like :

<dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <scope>provided</scope>
</dependency>

However, after correcting this, Tomcat will just keep trying to start, and eventually raise a timeout error. Here are the logs :

juil. 29, 2014 5:12:22 PM org.apache.catalina.core.AprLifecycleListener init
Infos: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_51\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\oraclexe\app\oracle\product\11.2.0\server\bin;;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\apache-maven-3.2.1\bin;C:\Program Files\Microsoft\Web Platform Installer\;.
juil. 29, 2014 5:12:22 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
Avertissement: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:visionet-server' did not find a matching property.
juil. 29, 2014 5:12:22 PM org.apache.coyote.http11.Http11Protocol init
Infos: Initialisation de Coyote HTTP/1.1 sur http-8080
juil. 29, 2014 5:12:22 PM org.apache.catalina.startup.Catalina load
Infos: Initialization processed in 566 ms
juil. 29, 2014 5:12:22 PM org.apache.catalina.core.StandardService start
Infos: Démarrage du service Catalina
juil. 29, 2014 5:12:22 PM org.apache.catalina.core.StandardEngine start
Infos: Starting Servlet Engine: Apache Tomcat/6.0.26
juil. 29, 2014 5:12:23 PM org.apache.catalina.core.ApplicationContext log
Infos: Initializing Spring root WebApplicationContext

and the server properties :

enter image description here I've also been looking to the server logs but they just don't update. Guess I must have done something wrong when recreating server on Eclipse... Anyway I have been stuck for two days now and really hope that somebody could help me understand what's going on. Thanks a lot !

Community
  • 1
  • 1
Flash_Back
  • 565
  • 3
  • 8
  • 31
  • Your app seems to take time starting. Open the Timeout section in the eclipse page you posted, and increase it. – JB Nizet Jul 29 '14 at 17:37
  • Thanks for your reply. I already increased it to 240 seconds, but there is still the timeout at the end. – Flash_Back Jul 29 '14 at 18:58
  • You've specified Eclipse to take over the Tomcat installation. Is this is on purpose? If not, remove the server (and runtime) from Eclipse, reinstall the physical Tomcat server under c:\apache-tomcat... and recreate the Tomcat server (and runtime) in Eclipse, specifying "Use workspace metadata ..." in the server config. Then clean your project and deploy it to Tomcat in Eclipse. – Jukka Jul 29 '14 at 20:07
  • Thanks, I did as you said but unfortunately still doesn't work. However I'm pretty sure I made some mistake while reinstalling. I removed tomcat, server and runtime in eclipse, then reinstalled tomcat and eclipse server. Then I deployed the .war with maven, but I'm still not sure about the server options "deploy path". Do I have to put "wtpwebapps", "webapps", or "C:\apache...\webapps" ? – Flash_Back Jul 30 '14 at 08:29
  • Finally, I just tried to run it from tomcat itself, outside Eclipse, and the result remains the same, the startup is stuck at "visionet folder deployment" (which is the folder created from my app's war file). I looked at the localhost logs and this is the same as eclipse's ones, stuck at "Infos: Initializing Spring root WebApplicationContext". – Flash_Back Jul 30 '14 at 09:05

1 Answers1

0

I finally found the solution, which was not a tomcat issue. There was actually nothing wrong in the tomcat logs, but I found somethig in the app logs. At the end, all of this was just because of some distant virtual machine being down and used by some part of code I didn't work on.

Thanks for your replies.

Flash_Back
  • 565
  • 3
  • 8
  • 31