20 mar 2014 kl. 08:53 skrev lee json <[email protected]>:

> It seems my message was deleted. So sorry post again.

We don’t delete messages, but this list is moderated to keep the spam out; I 
added a welcome message explaining this yesterday.

Regards,

Roland

> 
> Can you please give me advice on how to serialize message in ReliableProxy? I 
> would like to make contribution. 
> 
> Apology if sending redundant messages. 
> 
> Thanks
> 
> 
> On Tuesday, 18 March 2014 17:17:26 UTC+8, Patrik Nordwall wrote:
> Hi,
> 
> That is because the original message is wrapped in a ReliableProxy.Message, 
> which only has java serialization. It would be a great contribution to 
> provide a serializer for ReliableProxy.Message that use the configured 
> serializer for the wrapped message. If you are up for the job I can guide you 
> how to do it.
> 
> Cheers,
> Patrik
> 
> 
> On Tue, Mar 18, 2014 at 10:03 AM, lee json <[email protected]> wrote:
> My custom serialization object with remoting works without a problem. The 
> NotSerializableException is thrown when adding ReliableProxy. 
> 
> val proxy = context.system.actorOf(Props(classOf[ReliableProxy], remoteRef, 
> 100.millis), "proxy") 
> // remoteRef ! customSerializedObject // <- this works fine, remote can 
> receive the message correctly. 
> proxy ! customSerializedObject // <- this throws NotSerializableException.
> 
> From the stack trace, it looks like inside the FSM, it can't select the 
> correct serializer ( it always selects JavaSerializer ) in ReliableProxy 
> class. Is there any work around or what might be the root cause for this 
> issue? 
> 
> akka version is 2.2.3 
> java version is 1.6.x
> scala is 2.10.x
> 
> Thanks
>  
> Transient association error (association remains live)
> java.io.NotSerializableException: sample.model.CustomSerializedObject
>       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
>       at 
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
>       at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
>       at 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
>       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
>       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
>       at 
> akka.serialization.JavaSerializer$$anonfun$toBinary$1.apply$mcV$sp(Serializer.scala:129)
>       at 
> akka.serialization.JavaSerializer$$anonfun$toBinary$1.apply(Serializer.scala:129)
>       at 
> akka.serialization.JavaSerializer$$anonfun$toBinary$1.apply(Serializer.scala:129)
>       at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
>       at akka.serialization.JavaSerializer.toBinary(Serializer.scala:129)
>       at akka.remote.MessageSerializer$.serialize(MessageSerializer.scala:36)
>       at 
> akka.remote.EndpointWriter$$anonfun$akka$remote$EndpointWriter$$serializeMessage$1.apply(Endpoint.scala:672)
>       at 
> akka.remote.EndpointWriter$$anonfun$akka$remote$EndpointWriter$$serializeMessage$1.apply(Endpoint.scala:672)
>       at scala.util.DynamicVariable.withValue(DynamicVariable.scala:57)
>       at 
> akka.remote.EndpointWriter.akka$remote$EndpointWriter$$serializeMessage(Endpoint.scala:671)
>       at akka.remote.EndpointWriter$$anonfun$7.applyOrElse(Endpoint.scala:559)
>       at akka.remote.EndpointWriter$$anonfun$7.applyOrElse(Endpoint.scala:544)
>       at 
> scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:33)
>       at akka.actor.FSM$class.processEvent(FSM.scala:595)
>       at akka.remote.EndpointWriter.processEvent(Endpoint.scala:443)
>       at akka.actor.FSM$class.akka$actor$FSM$$processMsg(FSM.scala:589)
>       at akka.actor.FSM$$anonfun$receive$1.applyOrElse(FSM.scala:583)
>       at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498)
>       at akka.actor.ActorCell.invoke(ActorCell.scala:456)
>       at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237)
>       at akka.dispatch.Mailbox.run(Mailbox.scala:219)
>       at 
> akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
>       at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
>       at 
> scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
>       at 
> scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
>       at 
> scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
> 
> 
> -- 
> >>>>>>>>>> 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 http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> 
> -- 
> 
> Patrik Nordwall
> Typesafe -  Reactive apps on the JVM
> Twitter: @patriknw
> 
> 
> 
> -- 
> >>>>>>>>>> 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 http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.



Dr. Roland Kuhn
Akka Tech Lead
Typesafe – Reactive apps on the JVM.
twitter: @rolandkuhn


-- 
>>>>>>>>>>      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 http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to