Java 由于';警告:找不到记录器';

Java 由于';警告:找不到记录器';,java,log4j,spring-batch,slf4j,Java,Log4j,Spring Batch,Slf4j,我无法运行/调试我的程序。下面是我收到的错误消息: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/C:/work/dev/workspaces/eclipse-kepler-websphere-workspace-WS1/smartcontestation-batch/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticL

我无法运行/调试我的程序。下面是我收到的错误消息:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/work/dev/workspaces/eclipse-kepler-websphere-workspace-WS1/smartcontestation-batch/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/work/dev/workspaces/eclipse-kepler-websphere-workspace-WS1/smartcontestation-project/shared-lib/ear/lib/slf4j-log4j12-1.5.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Program%20Files%20(x86)/RSA/8.5/WASD8/plugins/com.ibm.ws.prereq.jaxrs.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.

我找到了解决方案:我从“C:\ProgramFiles(x86)\RSA\8.5\WAS8\profiles\AppSrv01\logs”中删除了一些日志文件,并进行了eclipse清理。之后它又重新工作了

在项目中定义一个有效的
log4j.xml
文件。这只是一个警告。它不会阻止你的程序运行。事实上,它会阻止它运行。正如我所知,我应该在类路径中定义log4j.xml。我在src/main/resources中定义它。实际上,它是在我执行clean/build-in-Eclipse之前运行的。当我运行一个简单的主程序时,我有一个java.lang.NoClassDefFoundError