【问题标题】:Gradle SLF4J Redshift JDBC conflictGradle SLF4J Redshift JDBC 冲突
【发布时间】:2019-12-19 12:24:45
【问题描述】:

我需要更新gradle中JDBC Redshift驱动的版本,看来1.3X有以下问题:

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:~/.gradle/caches/modules-2/files-2.1/com.amazon.redshift/redshift-jdbc42/1.2.37.1061/daad21f8637b6ccd2b86307a4f17e1e215df7365/redshift-jdbc42-1.2.37.1061.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:~/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.2.3/7c4f3c474fb2c041d8028740440937705ebb473a/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]

我可以在全局范围内排除 ch.qos.logback/logback-classic,但我想知道是否有更好的解决方法,因为我宁愿禁用来自 com.amazon.redshift/redshift-jdbc42 的意外重复记录器

【问题讨论】:

  • 你应该向亚马逊投诉:org.slf4j.impl.StaticLoggerBinder 的实现不属于 JDBC 驱动程序实现。
  • 那是肯定的,但想知道在他们开始遵循约定之前是否有某种解决方法

标签: java gradle jdbc amazon-redshift


【解决方案1】:

似乎从版本 1.2.34.1058 开始添加了 sl4j 依赖项。您可以使用低于该版本的任何版本,而无需多个 SLF4J 绑定。

我希望它有所帮助。 :)

【讨论】:

  • 不完全是因为我需要“未正确填充某些多线程环境中的 PreparedStatement 参数。”来自 1.2.32 的错误修复,您不能直接从我看到的内容中在 Gradle 中使用它。这也不是依赖,如果一切都好的话。
猜你喜欢
  • 2019-05-21
  • 1970-01-01
  • 1970-01-01
  • 2021-02-24
  • 1970-01-01
  • 2020-09-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多