Migration from Akka to Pekko - jackson serialization error #1389
Replies: 7 comments 5 replies
-
Could you try Pekko 1.0.3? It is closer to Akka 2.6 than Pekko 1.1 is. |
Beta Was this translation helpful? Give feedback.
-
The problem that led me to switch to 1.1.0-M1 was with the "pekko-persistence-jdbc" % "1.0.0" dependency. It relies on an older version of Slick (3.3.3), while "org.playframework" %% "play-slick" % "6.1.1" depends on the latest Slick version. I finally changed the play-slick dependency to an older version from Typesafe. The project compiled and started, but I got the same serialization error. application.conf: scalaVersion := "2.13.14"
ThisBuild / evictionErrorLevel := Level.Info
lazy val PekkoVersion = "1.0.2"
lazy val PekkoHttpVersion = "1.0.1"
lazy val PekkoManagementVersion = "1.0.0"
libraryDependencies ++= Seq(
guice,
ws,
clusterSharding,
"org.apache.pekko" %% "pekko-connectors-kafka" % "1.0.0",
"org.postgresql" % "postgresql" % "42.7.3",
//"org.playframework" %% "play-slick" % "6.1.1",
"com.typesafe.play" %% "play-slick" % "5.0.2",
"org.apache.pekko" %% "pekko-http" % PekkoHttpVersion,
"org.apache.pekko" %% "pekko-http-spray-json" % PekkoHttpVersion,
//"org.apache.pekko" %% "pekko-cluster-typed" % PekkoVersion,
//"org.apache.pekko" %% "pekko-cluster-sharding-typed" % PekkoVersion,
//"org.apache.pekko" %% "pekko-serialization-jackson" % PekkoVersion,
"org.apache.pekko" %% "pekko-discovery" % PekkoVersion,
"org.apache.pekko" %% "pekko-management-cluster-http" % PekkoManagementVersion,
"org.apache.pekko" %% "pekko-management-cluster-bootstrap" % PekkoManagementVersion,
"org.apache.pekko" %% "pekko-discovery-kubernetes-api" % PekkoManagementVersion,
"org.apache.pekko" %% "pekko-persistence-typed" % PekkoVersion,
"org.apache.pekko" %% "pekko-persistence-query" % PekkoVersion,
"org.apache.pekko" %% "pekko-persistence-jdbc" % "1.0.0",
// For projections
//"org.apache.pekko" %% "pekko-projection-durable-state" % "1.0.0",
//"org.apache.pekko" %% "pekko-projection-slick" % "1.0.0",
"org.scalatestplus.play" %% "scalatestplus-play" % "7.0.1" % Test
) |
Beta Was this translation helpful? Give feedback.
-
Can you enable debug logging? There is debug logging showing which Jackson modules get added. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
The I'll try to mark it directly. |
Beta Was this translation helpful? Give feedback.
-
Yes, Thank you! I'll fix it |
Beta Was this translation helpful? Give feedback.
-
Solved. val objectMapper = CBORMapper.builder()
.addModule(new ParameterNamesModule())
.addModule(new Jdk8Module())
.addModule(new JavaTimeModule())
.addModule(DefaultScalaModule)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.build() :: ClassTagExtensions |
Beta Was this translation helpful? Give feedback.
-
Hey,
I'm migrating my microservice from Akka 2.6.19 to Pekko 1.1.0-M1. I use Play, CQRS, and Durable State Persistent Actor. However, I'm encountering an issue with Jackson serialization.
Here are some details about my setup:
Commands:
build.sbt:
plugins.sbt:
application.conf:
Issue:
In Akka, everything worked fine, but in Pekko, I get the following error:
According to the default configuration, the module is added:
Despite this, the error persists. I would greatly appreciate any suggestions or guidance on resolving this issue.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions