Closed retrospectacus closed 7 years ago
This issue can be closed; I found the bug in my JsonReader for the TaxConfiguration trait. It was looking for the wrong id string in the JSON:
implicit def taxConfigurationFormat = new RootJsonFormat[TaxConfiguration] {
def write(s: TaxConfiguration) = JsObject(...)
def read(json: JsValue): TaxConfiguration = json match {
case JsObject(fields) => fields.get("taxId") match { // "taxId" here was "id"
case Some(JsString(id)) if TaxConfiguration.taxConfigurations.map(_.id.id).contains(id) => TaxConfiguration.byId(Id(id))
case _ => deserializationError("Tax Configuration expected")
}
case _ => deserializationError("Tax Configuration expected")
}
}
However it would be nice for debugging if the deserializationError (= throw new DeserializationException) was printed somewhere. Let me know if this can be intercepted somewhere.
Hi,
After a change to the structure of my snapshotted case class, I no longer receive the SnapshotOffer during PersistentActor recovery. What am I missing? Here are some hopefully useful pieces of my code.
Some relevant domain classes
And my Serializer, which has been working fine until the JobState changed.
JSON support using akka http spray
relevant piece of application.conf
We can see that I am using jdbc for storing snapshots and events in the database, which has been working fine. I have this snapshot for the job in question;
After the change, I simply no longer get a SnapshotOffer during actor recovery. There are no compilation errors or warnings, nor any kind of output from the application