can't enable logging of spring framework

China☆狼群 提交于 2019-12-02 03:29:48

I solved the problem !!

first of all, this error:

GRAVE: A child container failed during start java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/RH-Explore]]

is problem of deployment, so I did a clean for the project and then i got this error :

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.AbstractMethodError: org.slf4j.impl.JDK14LoggerAdapter.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V

this error is a problem of compatibilities of the SLF4J, so I changed the version from 1.5.8 to 1.7.12 and also I found some duplicated SLF4J packages should be removed from the pom.xml jars because of this error :

SLF4J: Class path contains multiple SLF4J bindings.

also I have this error in the console while starting tomcat:

INFOS: No Spring WebApplicationInitializer types detected on classpath

this a problem in servlet-api, I am using the version 2.5 so to solve it I changed to the version 3.0.1

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>javax.servlet-api</artifactId>
    <version>3.0.1</version>
</dependency>

and all problems is gone and spring logging is working fine :D

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!