Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: deserialize table updater row state #135

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

aludwiko
Copy link
Contributor

@aludwiko aludwiko commented Jan 10, 2025

after restarting the app with persistence enabled, I noticed:

Caused by: java.lang.IllegalStateException: Cannot decode [json.akka.io/customer.domain.CustomerRow] message type. Class mapping not found.
	at akka.javasdk.impl.serialization.JsonSerializer.fromBytes(JsonSerializer.scala:97)
	at akka.javasdk.impl.view.ViewDescriptorFactory$UpdateHandlerImpl.$anonfun$handle$2(ViewDescriptorFactory.scala:394)
	at scala.Option.map(Option.scala:242)
	at akka.javasdk.impl.view.ViewDescriptorFactory$UpdateHandlerImpl.$anonfun$handle$1(ViewDescriptorFactory.scala:394)
	at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:687)
	at scala.concurrent.impl.Promise$Transformation.run$$$capture(Promise.scala:467)
	at scala.concurrent.impl.Promise$Transformation.run(Promise.scala)
	at --- Async.Stack.Trace --- (captured by IntelliJ IDEA debugger)
	at scala.concurrent.impl.Promise$Transformation.<init>(Promise.scala:416)
	at scala.concurrent.impl.Promise$Transformation.<init>(Promise.scala:418)

the possible solution for that was to register that type with serializer.registerTypeHints, but then any class name change would require a migration, that's why the more flexible solution would be just to try to deserialize with a given type.

@johanandren johanandren merged commit 021e67a into java-spi Jan 10, 2025
22 checks passed
@johanandren johanandren deleted the deserialize-table-updater-row-state branch January 10, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants