2.9 with Scala 2.13 not supporting pack4j 6.00 dependency :Jackson Data-bind 2.15.x #12469
Replies: 2 comments 1 reply
-
There is a link in the documentation to an GitHub discussions thread on how to upgrade Jackson in a Play application:
So for you the solution would be to add to your val jacksonVersion = "2.14.3" // or 2.16.1 if you want to upgrade to latest jackson version (Play 2.9 or 3.0 use 2.14.3 by default)
val jacksonOverrides = Seq(
"com.fasterxml.jackson.core" % "jackson-core",
"com.fasterxml.jackson.core" % "jackson-annotations",
"com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8",
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310"
).map(_ % jacksonVersion)
val jacksonDatabindOverrides = Seq(
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion
)
val akkaSerializationJacksonOverrides = Seq(
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-cbor",
"com.fasterxml.jackson.module" % "jackson-module-parameter-names",
"com.fasterxml.jackson.module" %% "jackson-module-scala",
).map(_ % jacksonVersion)
dependencyOverrides ++= jacksonDatabindOverrides ++ jacksonOverrides ++ akkaSerializationJacksonOverrides Be aware that here I used Actually I would recommend to stay on 2.14.3 for now because there might be problem upgrading to Jackson 2.15 or newer (but I don't really now if this really is a problem in real life, I will first have to look into #12440): Also you can list the dependencies with following sbt commands to check which dependencies are pulled in:
Or you can also list the classpath to see which jar files are used, to make sure only Jackson 2.14.x (or 2.16.x) jars are put on the classpath actually:
For example, I added the
You can see ☝️ here that mixed jackson dependencies are on the classpath ( After applying the
|
Beta Was this translation helpful? Give feedback.
-
Thanks ...! Matthias It works
|
Beta Was this translation helpful? Give feedback.
-
Play Version
2.9 with scala 2.13
API
Java
Operating System
Windows
JDK
17
Library Dependencies
Beta Was this translation helpful? Give feedback.
All reactions