Multiple bindings were found on the class path

SLF4J API is designed to bind with one and only one underlying logging framework at a time. If more than one binding is present on the class path, SLF4J will emit a warning, listing the location of those bindings.

When multiple bindings are available on the class path, select one and only one binding you wish to use, and remove the other bindings. For example, if you have both slf4j-simple-1.7.9.jar and slf4j-nop-1.7.9.jar on the class path and you wish to use the nop (no-operation) binding, then remove slf4j-simple-1.7.9.jar from the class path.

The list of locations that SLF4J provides in this warning usually provides sufficient information to identify the dependency transitively pulling in an unwanted SLF4J binding into your project. In your project's pom.xml file, exclude this SLF4J binding when declaring the unscrupulous dependency. For example, cassandra-all version 0.8.1 declares both log4j and slf4j-log4j12 as compile-time dependencies. Thus, when you include cassandra-all as a dependency in your project, the cassandra-all declaration will cause both slf4j-log4j12.jar and log4j.jar to be pulled in as dependencies. In case you do not wish to use log4j as the the SLF4J backend, you can instruct Maven to exclude these two artifacts as shown next:

<dependencies>
<dependency>
<groupId> org.apache.cassandra</groupId>
<artifactId>cassandra-all</artifactId>
<version>0.8.1</version> <exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
<exclusion>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</exclusion>
</exclusions> </dependency>
</dependencies> http://www.slf4j.org/codes.html#multiple_bindings

Multiple bindings were found on the class path(转)的更多相关文章

  1. slf4j

    Simple Logging Facade for Java (SLF4J) slf4j可以看成是对各个日志框架的一种抽象,它提供了一套通用的日志使用接口. 下面是slf4j的几个版本比较: 1.6. ...

  2. SLF4J warning or error messages and their meanings(转)

    The method o.a.commons.logging.impl.SLF4FLogFactory#release was invoked. Given the structure of the ...

  3. 记一次项目上线后Log4j2不输出日志的坑

        公司项目采用了Log4j2来输出日志,在开发环境和测试环境下均可以输出日志,但在生成环境就没有日志输出.开始毫无头绪,后来通过不断的排查,终于解决了这个问题.在此记录下该问题的解决过程,便于后 ...

  4. SLF4J warning or error messages and their meanings

    来自:http://www.slf4j.org/codes.html#StaticLoggerBinder The method o.a.commons.logging.impl.SLF4FLogFa ...

  5. logger(一)slf4j简介及其实现原理

    一.slf4j简介 slf4j(Simple logging facade for Java)是对所有日志框架制定的一种规范.标准.接口,并不是一个框架的具体的实现,因为接口并不能独立使用,需要和具体 ...

  6. slf4j提示Class path contains multiple SLF4J bindings

    报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding .jar!/org/slf4j/impl/St ...

  7. spark 与 Hadoop 融合后启动 slf4j提示Class path contains multiple SLF4J bindings

    相关参考文献: https://www.oschina.net/question/93435_174549 警告信息如下: 看起来明明就是一个文件,怎么还提示multiple bindings呢,sl ...

  8. Knockout源代码精析-怎样解析demo元素,获取到bindings(二)?

    接上文这里開始分析applyBindingsToNodeInternal.applyBindingsToNodeInternal方法例如以下: function applyBindingsToNode ...

  9. Dual Dijkstra search for planning multiple paths

    The dual Dijkstra search for planning multiple paths is performed by: (1) calculating a first shorte ...

随机推荐

  1. 枚举子集的3种方式 -- C++描述

    要求: 给定一个集合,枚举所有可能的子集.此处的集合是不包含重复元素的. Method0: 增量构造法 思路:每次选取一个元素至集合中,为了避免枚举重复的集合,此处要采用定序技巧 -- 除了第一个元素 ...

  2. Poj 1002 487-3279(二叉搜索树)

    题目链接:http://poj.org/problem?id=1002 思路分析:先对输入字符进行处理,转换为标准形式:插入标准形式的电话号码到查找树中,若有相同号码计数器增加1,再中序遍历查找树. ...

  3. [置顶] NGINX原理分析之SLAB分配机制

    一.基础概述 如果使用伙伴系统分配和释放算法,不仅会造成大量的内存碎片,同时处理效率也比较低.SLAB是一种内存管理机制,其核心思想是预分配.SLAB是将空间按照SIZE对内存进行分类管理的,当申请一 ...

  4. STL之顺序容器

    顺序容器: vector:数组 list:链表 deque:双端数组 顺序容器适配器: stack:堆栈 queue:队列 priority_queue:优先级队列 deque是一个动态数组 dequ ...

  5. codeblock快捷键

    一款开源的C/C++ IDE(集成开发环境),基于wxWidgets GUI体系,跨平台支持. 从别处粘贴的,方便以后看,啦啦啦…… 编辑器 快捷键 功能 Ctrl+Z 恢复上一次操作 Ctrl+Sh ...

  6. 安装centos7注意事项

    1,安装centos7注意1和l的区分 2,每一次对/boot/grub2/或者/boot/grub或者/etc/grub/下的文件修改一定要重新编译配置文件sudo grub2-mkconfig - ...

  7. Android ListView两种长按弹出菜单方式

    转自:http://www.cnblogs.com/yejiurui/p/3247527.html package com.wyl.download_demo; import java.util.Ar ...

  8. Oracle中的单引号问题

    SELECT '<a href="javascript:void(0)" onclick="openWyl('''||a.aac001 FROM ac01 a; S ...

  9. php5.3升级到5.5

    在网站中发布中: / 开启调试模式 建议开发阶段开启 部署阶段注释或者设为falsedefine('APP_DEBUG',true); true没问题,改为:false就报错 报错如下: PHP Fa ...

  10. jQuery prop 全选和全不全

    $('#ckAll').click(function() { var value = $(this).is(':checked') ? true : false; $("input[name ...