不兼容的 Jackson 版本:sbt 中的 2.7.1?
Incompatible Jackson version: 2.7.1 in sbt?
当 运行 来自 sbt 的 TwitterServer 时我收到此错误:
SEVERE: LoadService: failed to
instantiate 'com.twitter.finagle.stats.MetricsExporter'
for the requested service 'com.twitter.finagle.http.HttpMuxHandler'
com.fasterxml.jackson.databind.JsonMappingException:
Incompatible Jackson version: 2.7.1
2.7 Jackson 依赖项正在从其他地方 (circ) 传递过来。我以为我可以通过这种方式覆盖它到2.6.7,但它似乎没有效果:
val jacksonV = "2.6.7"
val `jackson-core` = "com.fasterxml.jackson.core" % "jackson-core" % jacksonV
val `jackson-databind` = "com.fasterxml.jackson.core" % "jackson-databind" % jacksonV
val `jackson-annotations` = "com.fasterxml.jackson.core" % "jackson-annotations" % jacksonV
val `jackson-datatype-jsr310` = "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % jacksonV
dependencyOverrides += `jackson-core`
dependencyOverrides += `jackson-databind`
dependencyOverrides += `jackson-annotations`
dependencyOverrides += `jackson-datatype-jsr310`
知道为什么这不会覆盖任何东西吗?
看来我也需要导入这些覆盖的库依赖项,即使我没有直接使用它们也是如此:
libraryDependencies ++= Seq(
`jackson-databind`,
`jackson-core`,
`jackson-annotations`,
`jackson-datatype-jsr310`,
// ...
)
当 运行 来自 sbt 的 TwitterServer 时我收到此错误:
SEVERE: LoadService: failed to
instantiate 'com.twitter.finagle.stats.MetricsExporter'
for the requested service 'com.twitter.finagle.http.HttpMuxHandler'
com.fasterxml.jackson.databind.JsonMappingException:
Incompatible Jackson version: 2.7.1
2.7 Jackson 依赖项正在从其他地方 (circ) 传递过来。我以为我可以通过这种方式覆盖它到2.6.7,但它似乎没有效果:
val jacksonV = "2.6.7"
val `jackson-core` = "com.fasterxml.jackson.core" % "jackson-core" % jacksonV
val `jackson-databind` = "com.fasterxml.jackson.core" % "jackson-databind" % jacksonV
val `jackson-annotations` = "com.fasterxml.jackson.core" % "jackson-annotations" % jacksonV
val `jackson-datatype-jsr310` = "com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % jacksonV
dependencyOverrides += `jackson-core`
dependencyOverrides += `jackson-databind`
dependencyOverrides += `jackson-annotations`
dependencyOverrides += `jackson-datatype-jsr310`
知道为什么这不会覆盖任何东西吗?
看来我也需要导入这些覆盖的库依赖项,即使我没有直接使用它们也是如此:
libraryDependencies ++= Seq(
`jackson-databind`,
`jackson-core`,
`jackson-annotations`,
`jackson-datatype-jsr310`,
// ...
)