Do you have some collections involved in the pattern match perhaps? Show us your receiveCommand / receiveRecover.
-- Cheers, Konrad 'ktoso’ Malawski Akka @ Typesafe On 5 January 2016 at 15:55:18, [email protected] ([email protected]) wrote: Sorry, I've read fast your code. Em terça-feira, 5 de janeiro de 2016 11:54:07 UTC-3, [email protected] escreveu: Subr$ClientDeRegistered Subr$ClientRegistered Em terça-feira, 5 de janeiro de 2016 11:45:31 UTC-3, [email protected] escreveu: ClassCastException: myapp.actors.subr.Subr$ClientDeRegistered cannot be cast to myapp.actors.subr.Subr$ClientRegistered at myapp.actors.subr.Subr$$anonfun$register$1.apply at akka.persistence.Eventsourced$class.akka$persistence$Eventsourced$$peekApplyHandler at akka.persistence.Eventsourced$ProcessingState$$anonfun$2.applyOrElse at scala.runtime.AbstractPartialFunction.apply at akka.persistence.Eventsourced$$anon$2.stateReceive This is the code block that is executed. As you can see there's no reference to ClientDeRegistered. It could've been persisted before this one. def register(sessId: SessionId, actor: ActorRef) = { val cr = ClientRegistered(sessId,serializedActorPath) persist(cr) { evt ⇒ updateState(evt) } } Any idea why this could be happening? I am really confused how something that accepts Any => Unit could throw a ClassCastException. I am using akka 2.4.1 and akka-persistence-cassandra as the persistence plugin. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
