J'ai supprimé le jar de spring-test, toujours même problème.
J'ai supprimé slf4j, mais il me sort une erreur lors du chargement du contexte:
Le slf4j est fourni avec une webapp d'exemple de Spring dont j'ai copié les jar.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91 22 nov. 2012 00:31:12 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: .:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java 22 nov. 2012 00:31:12 org.apache.tomcat.util.digester.SetPropertiesRule begin ATTENTION: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:monapp' did not find a matching property. 22 nov. 2012 00:31:13 org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-8080"] 22 nov. 2012 00:31:13 org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-bio-8009"] 22 nov. 2012 00:31:13 org.apache.catalina.startup.Catalina load INFO: Initialization processed in 1320 ms 22 nov. 2012 00:31:13 org.apache.catalina.core.StandardService startInternal INFO: Démarrage du service Catalina 22 nov. 2012 00:31:13 org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.32 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined 22 nov. 2012 00:31:18 org.apache.catalina.startup.TaglibUriRule body INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined 22 nov. 2012 00:31:19 org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath 22 nov. 2012 00:31:19 org.apache.catalina.core.StandardContext listenerStart GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.springframework.web.context.ContextLoaderListener java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:270) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4791) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5285) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559) ... 15 more 22 nov. 2012 00:31:19 org.apache.catalina.core.StandardContext startInternal GRAVE: Error listenerStart 22 nov. 2012 00:31:19 org.apache.catalina.core.StandardContext startInternal GRAVE: Erreur de démarrage du contexte [/monapp] suite aux erreurs précédentes 22 nov. 2012 00:31:19 org.apache.catalina.core.ApplicationContext log INFO: Closing Spring root WebApplicationContext 22 nov. 2012 00:31:19 org.apache.catalina.core.StandardContext listenerStop GRAVE: Exception lors de l'envoi de l'évènement contexte détruit (context destroyed) à l'instance de classe d'écoute org.springframework.web.context.ContextLoaderListener java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156) at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) at org.springframework.web.context.ContextCleanupListener.<clinit>(ContextCleanupListener.java:43) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:144) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4831) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5478) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:680) 22 nov. 2012 00:31:19 org.apache.catalina.startup.HostConfig deployDirectory INFO: Déploiement du répertoire /Users/anas/Repository/server/apache-tomcat-7.0.32-default/webapps/ROOT de l'application web 22 nov. 2012 00:31:19 org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8080"] 22 nov. 2012 00:31:19 org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8009"] 22 nov. 2012 00:31:19 org.apache.catalina.startup.Catalina start INFO: Server startup in 6348 ms
Bon, vu que slf4j est visiblement indispensable je vais regarder du coté de la conf slf4j.
Partager