Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 关于多个绑定的SLF4J警告_Java_Eclipse_Binding_Slf4j - Fatal编程技术网

Java 关于多个绑定的SLF4J警告

Java 关于多个绑定的SLF4J警告,java,eclipse,binding,slf4j,Java,Eclipse,Binding,Slf4j,我试图学习RCP,并想这样做,但当我点击运行,然后我得到了多个绑定 SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [bundleresource://940.fwk970900790:1/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [bundleresource://940.fwk970900790:2/o

我试图学习RCP,并想这样做,但当我点击运行,然后我得到了多个绑定

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://940.fwk970900790:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://940.fwk970900790:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
我怎样才能修好它

谢谢,
patrio

您的环境中可能存在多个问题

  • 您确定类路径中只有slf4j.jar
  • 如果您在项目中使用的是Maven其他jar文件,包括slf4j.jar,这可能是可能的
  • 确保最新的slf4j.jar应该是eclipse类路径中的第一个
  • 对于Maven用户,请执行此操作

    <exclusions>
        <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </exclusion>
    </exclusions> 
    
    
    org.slf4j
    slf4j-log4j12
    
    1。我在我的类补丁中没有看到任何slf4j。2.我不使用Maven,不管你以什么方式编译你的项目,确保没有多个slf4j.jar,我不确定是否要检查它。你能告诉我吗?你正在使用哪个IDE?你是如何编译这个项目的?这是一个Java或Web项目?我非常喜欢我链接的教程