Tomcat7 ne démarre pas sous eclipse

cs_yesican Messages postés 3 Date d'inscription lundi 27 décembre 2010 Statut Membre Dernière intervention 27 décembre 2010 - 27 déc. 2010 à 16:03
cs_yesican Messages postés 3 Date d'inscription lundi 27 décembre 2010 Statut Membre Dernière intervention 27 décembre 2010 - 27 déc. 2010 à 20:36
Bonjour à tous,

Lorsque j'essaye de démarrer tomcat7 sous eclipse j'obtiens le message d'erreur suivant:

27 déc. 2010 12:48:05 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: D:\jvm\jdk1.6.0_11\jre\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/java3/eclipse/jre/bin/client;D:/java3/eclipse/jre/bin;D:/java3/eclipse/jre/lib/i386;;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Sun\SDK\bin
27 déc. 2010 12:48:06 org.apache.tomcat.util.digester.SetPropertiesRule begin
ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:intro' did not find a matching property.
27 déc. 2010 12:48:06 org.apache.coyote.http11.Http11Protocol init
INFO: Initialisation de Coyote HTTP/1.1 sur http-8080
27 déc. 2010 12:48:06 org.apache.coyote.ajp.AjpProtocol init
INFO: Initializing Coyote AJP/1.3 on ajp-8009
27 déc. 2010 12:48:06 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1150 ms
27 déc. 2010 12:48:06 org.apache.catalina.core.StandardService startInternal
INFO: Démarrage du service Catalina
27 déc. 2010 12:48:06 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.5
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1281)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1313)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:866)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:316)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4900)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:738)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1035)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:289)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:442)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:674)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
at org.apache.catalina.startup.Catalina.start(Catalina.java:596)
... 6 more


Si quelqu'un peut m'aider, merci d'avance.
A voir également:

4 réponses

Utilisateur anonyme
27 déc. 2010 à 17:25
Bonjour

La réponse est là :
http://www3.ntu.edu.sg/home/ehchua/programming/howto/Tomcat7_HowTo.html

Common and not-so-Common Errors

Error Message: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()
Ljavax/servlet/SessionCookieConfig;
Symptoms: Tomcat cannot start
Probable Causes: This is a new method in Servlets 3.0 (which Tomcat 7 supports).
There is a Servlets 2.x API is your CLASSPATH or JDK's extension directory.
Solution: Check your CLASSPATH. Remove servlet-api.jar from JDK's extension directory if any.

Error Message: 404 File Not Found
Symptoms: Browser fails to retrieve the requested resource
Probable Causes: Server cannot find the resource requested that matches the request URL.
Solution:
1. For visible resources such as HTML files, check that particular resource reside under the context root.
2. For servlet, check the URL-servlet mapping in contextRoot\WEB-INF\web.xml.
Make sure that you have compiled your servlet, and the class file resides in contextRoot\WEB-INF\classes.
3. You may want to restart the Tomcat, and browser (to clear the browser's cache).

Error Message: 500 Internal Server Error
Symptoms: Browser fails to retrieve the requested resource
Probable Causes: Many probable causes. Goto Tomcat's console to look for the error message.
Scroll up slowly to look for the first-line of the error message.
Solution:
Solution depends on the error message.
Correct the bugs in your servlet and recompile. Refresh your browser.
You may want to restart the Tomcat, and browser (to clear the browser's cache).



En gros, fais le ménage sur ta machine, arrête de mettre n'importe quoi dans ton classpath et ça devrait aller. Il y a un conflit avec une vieille version d'un JAR utilisé par le moteur de Servlets.

























0
cs_yesican Messages postés 3 Date d'inscription lundi 27 décembre 2010 Statut Membre Dernière intervention 27 décembre 2010
27 déc. 2010 à 18:48
Salut gouessej,

Il n'y avait pas de .jar dans mon CLASSPATH que j'ai supprimé par ailleurs.

J'ai suivi ton lien, mais je me suis arrété à l'étape ou il faut démarrer tomcat via la console avec startup, ça n'a pas marché, il n'a pas reconnu la commande.

Voila, si tu es toujours disponible pour m'apporter un éclaircissement?
0
Utilisateur anonyme
27 déc. 2010 à 19:43
Désolé mais si tu as toujours une NoSuchMethodError, cela veut bien dire qu'il reste un servlet-api.jar trop vieux quelque part.

Tu dois être sous Windows... Il faut utiliser le chemin absolu vers Java entre guillemets du genre
"C:\Program Files\Java"...








0
cs_yesican Messages postés 3 Date d'inscription lundi 27 décembre 2010 Statut Membre Dernière intervention 27 décembre 2010
27 déc. 2010 à 20:36
J'ai fait une recherche sur tout l'ordinateur et j'ai supprimé tous les servlet-api.jar, mais j'ai toujours le même message
0
Rejoignez-nous