com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.14.3 requires Jackson Databind version >= 2.14.0 and < 2.15.0 - Found jackson-databind version 2.15.0 #192
Labels
bug
This points to a verified bug in the code
Checklist
Description
using below
jwks-rsa 0.22.1, scala 2.13.12
and play framework 3.0.1
when run the application,
sbt run
it has exceptions like beow
[error] com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.14.3 requires Jackson Databind version >= 2.14.0 and < 2.15.0 - Found jackson-databind version 2.15.0
see more details:
--- (Running the application, auto-reloading is enabled) ---
[error] com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.14.3 requires Jackson Databind version >= 2.14.0 and < 2.15.0 - Found jackson-databind version 2.15.0
[error] at com.fasterxml.jackson.module.scala.JacksonModule.setupModule(JacksonModule.scala:61)
[error] at com.fasterxml.jackson.module.scala.JacksonModule.setupModule$(JacksonModule.scala:46)
[error] at com.fasterxml.jackson.module.scala.DefaultScalaModule.setupModule(DefaultScalaModule.scala:17)
[error] at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:879)
[error] at org.apache.pekko.serialization.jackson.JacksonObjectMapperProvider$.$anonfun$configureObjectMapperModules$4(JacksonObjectMapperProvider.scala:252)
[error] at org.apache.pekko.serialization.jackson.JacksonObjectMapperProvider$.$anonfun$configureObjectMapperModules$4$adapted(JacksonObjectMapperProvider.scala:251)
[error] at scala.collection.immutable.List.foreach(List.scala:333)
[error] at org.apache.pekko.serialization.jackson.JacksonObjectMapperProvider$.configureObjectMapperModules(JacksonObjectMapperProvider.scala:251)
[error] at org.apache.pekko.serialization.jackson.JacksonObjectMapperProvider$.createObjectMapper(JacksonObjectMapperProvider.scala:275)
[error] at org.apache.pekko.serialization.jackson.JacksonObjectMapperProvider.create(JacksonObjectMapperProvider.scala:369)
[error] at org.apache.pekko.serialization.jackson.JacksonObjectMapperProvider.$anonfun$getOrCreate$1(JacksonObjectMapperProvider.scala:327)
[error] at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
[error] at org.apache.pekko.serialization.jackson.JacksonObjectMapperProvider.getOrCreate(JacksonObjectMapperProvider.scala:327)
[error] at org.apache.pekko.serialization.jackson.JacksonJsonSerializer.(JacksonSerializer.scala:151)
[error] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
[error] at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[error] at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
[error] at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
[error] at org.apache.pekko.actor.ReflectiveDynamicAccess.$anonfun$createInstanceFor$1(ReflectiveDynamicAccess.scala:50)
[error] at scala.util.Try$.apply(Try.scala:210)
[error] at org.apache.pekko.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:45)
[error] at org.apache.pekko.actor.ReflectiveDynamicAccess.$anonfun$createInstanceFor$5(ReflectiveDynamicAccess.scala:58)
[error] at scala.util.Success.flatMap(Try.scala:258)
[error] at org.apache.pekko.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:57)
[error] at org.apache.pekko.serialization.Serialization$$anonfun$serializerOf$1$$anonfun$applyOrElse$1.applyOrElse(Serialization.scala:409)
[error] at org.apache.pekko.serialization.Serialization$$anonfun$serializerOf$1$$anonfun$applyOrElse$1.applyOrElse(Serialization.scala:405)
[error] at scala.util.Failure.recoverWith(Try.scala:240)
[error] at org.apache.pekko.serialization.Serialization$$anonfun$serializerOf$1.applyOrElse(Serialization.scala:405)
[error] at org.apache.pekko.serialization.Serialization$$anonfun$serializerOf$1.applyOrElse(Serialization.scala:403)
[error] at scala.util.Failure.recoverWith(Try.scala:240)
[error] at org.apache.pekko.serialization.Serialization.serializerOf(Serialization.scala:403)
[error] at org.apache.pekko.serialization.Serialization.$anonfun$serializers$2(Serialization.scala:437)
[error] at scala.collection.Iterator$$anon$9.next(Iterator.scala:584)
[error] at scala.collection.immutable.HashMapBuilder.addAll(HashMap.scala:2406)
[error] at scala.collection.immutable.HashMap$.from(HashMap.scala:2218)
[error] at scala.collection.immutable.HashMap$.from(HashMap.scala:2194)
[error] at scala.collection.MapOps$WithFilter.map(Map.scala:381)
[error] at org.apache.pekko.serialization.Serialization.(Serialization.scala:437)
[error] at org.apache.pekko.serialization.SerializationExtension$.createExtension(SerializationExtension.scala:28)
[error] at org.apache.pekko.serialization.SerializationExtension$.createExtension(SerializationExtension.scala:24)
[error] at org.apache.pekko.actor.ActorSystemImpl.registerExtension(ActorSystem.scala:1177)
[error] at org.apache.pekko.actor.ActorSystemImpl.$anonfun$loadExtensions$1(ActorSystem.scala:1220)
[error] at scala.collection.immutable.Vector.foreach(Vector.scala:2124)
[error] at org.apache.pekko.actor.ActorSystemImpl.loadExtensions$1(ActorSystem.scala:1214)
[error] at org.apache.pekko.actor.ActorSystemImpl.loadExtensions(ActorSystem.scala:1233)
[error] at org.apache.pekko.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:1054)
[error] at org.apache.pekko.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:1041)
[error] at org.apache.pekko.actor.ActorSystemImpl._start(ActorSystem.scala:1040)
[error] at org.apache.pekko.actor.ActorSystemImpl.start(ActorSystem.scala:1064)
[error] at org.apache.pekko.actor.ActorSystem$.apply(ActorSystem.scala:282)
[error] at org.apache.pekko.actor.ActorSystem$.apply(ActorSystem.scala:326)
[error] at org.apache.pekko.actor.ActorSystem$.apply(ActorSystem.scala:300)
[error] at play.core.server.DevServerStart$.mkServerActorSystem(DevServerStart.scala:90)
[error] at play.core.server.DevServerStart$.$anonfun$mainDev$1(DevServerStart.scala:80)
[error] at play.core.server.DevServerStart.$anonfun$mainDev$2(DevServerStart.scala:308)
[error] at play.utils.Threads$.withContextClassLoader(Threads.scala:22)
[error] at play.core.server.DevServerStart.mainDev(DevServerStart.scala:107)
[error] at play.core.server.DevServerStart$.mainDev(DevServerStart.scala:80)
[error] at play.core.server.DevServerStart$.mainDevHttpMode(DevServerStart.scala:55)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[error] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[error] at play.runsupport.Reloader$.startDevMode(Reloader.scala:314)
[error] stack trace is suppressed; run last Compile / run for the full output
[error] (Compile / run) com.fasterxml.jackson.databind.JsonMappingException: Scala module 2.14.3 requires Jackson Databind version >= 2.14.0 and < 2.15.0 - Found jackson-databind version 2.15.0
[error] Total time: 1 s, completed 11 Feb 2024, 17.43.12
I had to add below as work around:
inspired from this issue: jwt-scala/jwt-scala#403
Qs:
Reproduction
see description add the dependency and playframework, run the application it hsa the run time error
Additional context
No response
jwks-rsa version
0.22.1
Java version
17.0.6
The text was updated successfully, but these errors were encountered: