Server initiated remote actor microkernel deployment

13 views
Skip to first unread message

Ross McDonald

unread,
Aug 9, 2010, 6:21:17 AM8/9/10
to Akka User List
Hi Guys.

I have some server initiated remote actors which have been in production for a while. They run happily in 'sbt console' or run as a library in various servlet containers. I would now like to test deploying to the microkernel for the sake of portability. I have tried a few options but keep getting the same error, wondering what I am doing wrong.

Sample remote actor:

class DummySimpleActorService extends ... {

override def init = {
RemoteNode.start("localhost", 9999)
RemoteNode.register("dummy:service", self)
}
}


Sample deployment:

...
...
class Boot {
val supervisor = Supervisor(
SupervisorConfig(
RestartStrategy(AllForOne, 3, 1000, List(classOf[Exception])),
Supervise(
actorOf[DummySimpleActorService],
LifeCycle(Permanent),
RemoteAddress("localhost", 9999))
:: Nil))

//val actorService = actorOf[DummySimpleActorService].start

/*class Boot {
val factory = SupervisorFactory(
SupervisorConfig(
RestartStrategy(OneForOne, 3, 100,List(classOf[Exception])),
Supervise(
actorOf[DummySimpleActorService],
LifeCycle(Permanent))
:: Nil))
factory.newInstance.start
}*/
}

I keep getting :

java.lang.ClassNotFoundException: dummy:service
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at se.scalablesolutions.akka.remote.RemoteServerHandler.createActor(RemoteServer.scala:516)
at se.scalablesolutions.akka.remote.RemoteServerHandler.dispatchToActor(RemoteServer.scala:441)
at se.scalablesolutions.akka.remote.RemoteServerHandler.handleRemoteRequestProtocol(RemoteServer.scala:431)
at se.scalablesolutions.akka.remote.RemoteServerHandler.messageReceived(RemoteServer.scala:418)
at se.scalablesolutions.akka.remote.RemoteServerHandler.handleUpstream(RemoteServer.scala:411)

thanks for your help,

-- Ross

Ross McDonald
Twitter: @rossajmcd
Blog: rossputo.blogspot.com


Jonas Bonér

unread,
Aug 9, 2010, 6:23:44 AM8/9/10
to akka...@googlegroups.com
This smells like a nasty bug/regression. I'll take a look at it ASAP.
Is it master?

> --
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
>
>

--
Jonas Bonér

code:   http://akkasource.org
blog:    http://jonasboner.com
twitter: @jboner

Ross McDonald

unread,
Aug 9, 2010, 6:27:08 AM8/9/10
to akka...@googlegroups.com
Hi Jonas.

Yes, master, updated this morning.

Thanks,

-- Ross

Viktor Klang

unread,
Aug 9, 2010, 6:32:50 AM8/9/10
to akka...@googlegroups.com
Hi Ross,

could you send a full startup-log (you can send it privately if you want)

I think there could be an initialization-ordering issue at fault here.

Cheers,

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.




--
Viktor Klang,
Code Connoisseur
Work:   www.akkasource.com
Code:   github.com/viktorklang
Follow: twitter.com/viktorklang
Read:   klangism.tumbler.com

Jonas Bonér

unread,
Aug 9, 2010, 6:33:45 AM8/9/10
to akka...@googlegroups.com
Are you getting this without sending the actor any messages? Looks
like it receives a message and then dies. Can you post the full code?

--

Ross McDonald

unread,
Aug 9, 2010, 6:45:48 AM8/9/10
to akka...@googlegroups.com
Hi.

I get this when I send the actor its first message. I am just going to bash together a quick dummy project, I will try to attach it on the list or email it once I am done.

Cheers,

-- Ross

Viktor Klang

unread,
Aug 9, 2010, 6:50:29 AM8/9/10
to akka...@googlegroups.com
Hi,

Jonas, somehow it thinks "dummy:service" is a Fully Qualified Class Name?

I need to head out to grab something to eat,
if you need my assistance when I get back I'm available.

Cheers,

Jonas Bonér

unread,
Aug 9, 2010, 7:07:36 AM8/9/10
to akka...@googlegroups.com
On 9 August 2010 12:50, Viktor Klang <viktor...@gmail.com> wrote:
> Hi,
>
> Jonas, somehow it thinks "dummy:service" is a Fully Qualified Class Name?

Yes. That is it. It mixes ID with class name. Shouldn't be too hard to find.

>
> I need to head out to grab something to eat,
> if you need my assistance when I get back I'm available.

Take it. I'm up to my nose in doc hell.

Ross McDonald

unread,
Aug 9, 2010, 7:19:29 AM8/9/10
to akka...@googlegroups.com
Sample posted to your personals emails, thanks guys.

-- Ross

Ross McDonald

unread,
Aug 9, 2010, 6:11:26 PM8/9/10
to akka...@googlegroups.com
All sorted thanks to your help Viktor. One happy user about to head to bed and dream sweet hAkking dreams :-)

-- Ross

Viktor Klang

unread,
Aug 9, 2010, 6:23:44 PM8/9/10
to akka...@googlegroups.com
On Tue, Aug 10, 2010 at 12:11 AM, Ross McDonald <ross...@gmail.com> wrote:
All sorted thanks to your help Viktor.  One happy user about to head to bed and dream sweet hAkking dreams :-)

You're most welcome!

Sleep tight, bug let the Thread-bugs bite

;-)
 

Reply all
Reply to author
Forward
0 new messages