Error upon returning value from remote typed actor

104 views
Skip to first unread message

gutzeit

unread,
Jul 28, 2011, 5:15:00 AM7/28/11
to akka...@googlegroups.com
Dear list members,

I have remote typed actors which return Future with some value in it.

I can see the following in the log:

[ERROR]   [7/28/11 12:00 PM] [pool-4-thread-4] [RemoteServerHandler] java.lang.String cannot be cast to scala.Tuple3
java.lang.ClassCastException: java.lang.String cannot be cast to scala.Tuple3
        at akka.remote.netty.RemoteServerHandler.dispatchToTypedActor(NettyRemoteSupport.scala:1037)
        at akka.remote.netty.RemoteServerHandler.handleRemoteMessageProtocol(NettyRemoteSupport.scala:964)
        at akka.remote.netty.RemoteServerHandler.messageReceived(NettyRemoteSupport.scala:946)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
        at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362)
        at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:514)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
        at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

Java API, Akka 1.1.3.

It seems that the operation is being performed ok, nevertheless this exception occurs. Does anyone has any idea what it is ?

Thanks in advance.

√iktor Ҡlang

unread,
Jul 28, 2011, 6:28:28 AM7/28/11
to akka...@googlegroups.com
I've pushed a suggested fix to "release-1.1.4" build that locally and test that, comment the following ticket when you have feedback:
https://www.assembla.com/spaces/akka/tickets/1058-error-upon-returning-value-from-remote-typed-actor

Cheers,


--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/EebI8SCLSzQJ.
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

Akka Tech Lead
Typesafe - Enterprise-Grade Scala from the Experts

Twitter: @viktorklang

gutzeit

unread,
Jul 28, 2011, 4:28:28 PM7/28/11
to akka...@googlegroups.com
Thank you very much, Viktor. While we at it can you please take a look on two addition issues TypedActors are suffering from ?

1. method parameters can not be primitives, has to be an object.
2. If TypedActor implements an interface that inherits from another interface, methods of that interface can not be executed, fails with exception.

Thanks in advance.

I just want to save others time it took to me to understand those limitations :)

√iktor Ҡlang

unread,
Jul 28, 2011, 4:59:36 PM7/28/11
to akka...@googlegroups.com

Both those problems should be fixed in 2.0.

You can probably lift the new implementation from 2.0 into your projejt, but beware that it's a completely new impl that doesn't have a 1-1 mapping with yhe old.

Hope that helps,

Cheers,
V

> --
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/gDNcEdYn9nsJ.

gutzeit

unread,
Jul 28, 2011, 5:46:33 PM7/28/11
to akka...@googlegroups.com
I understand that it will take a while for 2.0 to become available and tested. 
Why wouldn't you incorporate the new TypedActor implementation into 1.1.4 release ? I can be the Guinea Pig :)

√iktor Ҡlang

unread,
Jul 28, 2011, 5:54:33 PM7/28/11
to akka...@googlegroups.com

I'm sorry, can't break APIs in minor release.
You can, as I said, move the single TypedActor.scala from 2.0 into your project.

Cheers,
V

> --
> You received this message because you are subscribed to the Google Groups "Akka User List" group.
> To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/WSMprPIuprwJ.

gutzeit

unread,
Aug 2, 2011, 3:26:39 AM8/2/11
to akka...@googlegroups.com
I am trying to build the release-1.1.4 using SBT but it fails with the following:

:: problems summary ::
:::: WARNINGS
                module not found: org.scala-tools.sbt#sbt_2.8.1;0.7.7

        ==== local: tried

          C:\Users\Dima Gutzeit\.ivy2/local/org.scala-tools.sbt/sbt_2.8.1/0.7.7/
ivys/ivy.xml

          -- artifact org.scala-tools.sbt#sbt_2.8.1;0.7.7!sbt_2.8.1.jar:

          C:\Users\Dima Gutzeit\.ivy2/local/org.scala-tools.sbt/sbt_2.8.1/0.7.7/
jars/sbt_2.8.1.jar

        ==== Maven2 Local: tried

          file://C:\Users\Dima Gutzeit/.m2/repository/org/scala-tools/sbt/sbt_2.
8.1/0.7.7/sbt_2.8.1-0.7.7.pom

          -- artifact org.scala-tools.sbt#sbt_2.8.1;0.7.7!sbt_2.8.1.jar:

          file://C:\Users\Dima Gutzeit/.m2/repository/org/scala-tools/sbt/sbt_2.
8.1/0.7.7/sbt_2.8.1-0.7.7.jar

        ==== typesafe-ivy-releases: tried

_2.8.1/0.7.7/ivys/ivy.xml

          -- artifact org.scala-tools.sbt#sbt_2.8.1;0.7.7!sbt_2.8.1.jar:

_2.8.1/0.7.7/jars/sbt_2.8.1.jar

        ==== Maven Central: tried

2.8.1-0.7.7.pom

          -- artifact org.scala-tools.sbt#sbt_2.8.1;0.7.7!sbt_2.8.1.jar:

2.8.1-0.7.7.jar

        ==== Scala-Tools Maven2 Repository: tried

.7/sbt_2.8.1-0.7.7.pom

          -- artifact org.scala-tools.sbt#sbt_2.8.1;0.7.7!sbt_2.8.1.jar:

.7/sbt_2.8.1-0.7.7.jar

        ==== Scala-Tools Maven2 Snapshots Repository: tried

7.7/sbt_2.8.1-0.7.7.pom

          -- artifact org.scala-tools.sbt#sbt_2.8.1;0.7.7!sbt_2.8.1.jar:

7.7/sbt_2.8.1-0.7.7.jar

                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: org.scala-tools.sbt#sbt_2.8.1;0.7.7: not found

                ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-tools.sbt#sbt_2.8.1;0.7.7: not found
Error during sbt execution: Error retrieving required libraries
  (see E:\jboner-akka-1067c22\project\boot\update.log for complete log)
Error: Could not retrieve sbt 0.7.7


What am I missing here ?

Thanks in advance.

√iktor Ҡlang

unread,
Aug 2, 2011, 3:28:45 AM8/2/11
to akka...@googlegroups.com
What version of sbt are you using?


Thanks in advance.

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/0B_S0WAkod4J.

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.

gutzeit

unread,
Aug 2, 2011, 4:28:18 AM8/2/11
to akka...@googlegroups.com
Latest, which is 0.10.1 .

√iktor Ҡlang

unread,
Aug 2, 2011, 4:30:49 AM8/2/11
to akka...@googlegroups.com


On Tue, Aug 2, 2011 at 10:28 AM, gutzeit <gut...@gmail.com> wrote:
Latest, which is 0.10.1 .

Try using 0.7.7
 

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/mz5GUsdprR8J.

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.

gutzeit

unread,
Aug 2, 2011, 4:37:57 AM8/2/11
to akka...@googlegroups.com
Will do. The funny thing is that it can not be found the typesafe's artifactory (the oldest there is 0.9.9) and one should go to old SBT site on google code to get it.(Akka is typesafe as well, so something is not right .. :) ).

√iktor Ҡlang

unread,
Aug 2, 2011, 5:14:21 AM8/2/11
to akka...@googlegroups.com
On Tue, Aug 2, 2011 at 10:37 AM, gutzeit <gut...@gmail.com> wrote:
Will do. The funny thing is that it can not be found the typesafe's artifactory (the oldest there is 0.9.9) and one should go to old SBT site on google code to get it.(Akka is typesafe as well, so something is not right .. :) ).

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/orO0QCfZssgJ.

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.

gutzeit

unread,
Aug 2, 2011, 5:54:18 AM8/2/11
to akka...@googlegroups.com
Ok, compiled the release-1.1.4.

I do not see the error that was there before. But something very strange happens. Every third request to remote actor (!):

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at akka.remote.netty.RemoteServerHandler.dispatchToTypedActor(NettyRemoteSupport.scala:1107)
        at akka.remote.netty.RemoteServerHandler.handleRemoteMessageProtocol(NettyRemoteSupport.scala:972)
        at akka.remote.netty.RemoteServerHandler.messageReceived(NettyRemoteSupport.scala:954)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
        at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362)
        at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:514)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
        at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: akka.actor.ActorInitializationException: Actor has not been started, you need to invoke 'actor.start()' before using it
[locahost_d6fd0470-bcea-11e0-99ef-00304861e5e1]
        at akka.actor.ScalaActorRef$class.$bang$bang$bang(ActorRef.scala:1358)
        at akka.actor.LocalActorRef.$bang$bang$bang(ActorRef.scala:586)
        at akka.actor.ActorAspect.localDispatch(TypedActor.scala:981)
        at akka.actor.TypedActorAspect.dispatch(TypedActor.scala:928)
        at akka.actor.TypedActorAspect.invoke(TypedActor.scala:923)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313687025569_1__521895947__2010469476___AW_JoinPoint.proceed(Unknown Source)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313687025569_1__521895947__2010469476___AW_JoinPoint.invoke(Unknown Source)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313687025569.getContacts(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at akka.remote.netty.RemoteServerHandler.dispatchToTypedActor(NettyRemoteSupport.scala:1107)
        at akka.remote.netty.RemoteServerHandler.handleRemoteMessageProtocol(NettyRemoteSupport.scala:972)
        at akka.remote.netty.RemoteServerHandler.messageReceived(NettyRemoteSupport.scala:954)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
        at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362)
        at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:514)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
        at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

        at akka.actor.ScalaActorRef$class.$bang$bang$bang(ActorRef.scala:1358)
        at akka.actor.LocalActorRef.$bang$bang$bang(ActorRef.scala:586)
        at akka.actor.ActorAspect.localDispatch(TypedActor.scala:981)
        at akka.actor.TypedActorAspect.dispatch(TypedActor.scala:928)
        at akka.actor.TypedActorAspect.invoke(TypedActor.scala:923)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313687025569_1__521895947__2010469476___AW_JoinPoint.proceed(Unknown Source)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313687025569_1__521895947__2010469476___AW_JoinPoint.invoke(Unknown Source)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313687025569.getContacts(Unknown Source)

the way I start the remote module is (in Boot):  

    log.debug("Registering remote actors");
    RemoteServerModule remoteServerModule = Actors.remote();
    Creator<Object> creator = new Creator<Object>() {
      @Override
      public RemoteGraphService create() {
        log.debug("Creating new actor instance upon request arrival");
        RemoteGraphService actor = TypedActor.<RemoteGraphService>newInstance(RemoteGraphService.class, RemoteGraphServiceActor.class, shortTimeout);
        log.debug("Returning newly created actor");
        return actor;
      }
    };
    log.debug("Registering remote modules");
    remoteServerModule.registerTypedPerSessionActor(RemoteGraphService.class.getSimpleName(), creator);

gutzeit

unread,
Aug 2, 2011, 5:57:22 AM8/2/11
to akka...@googlegroups.com
Correction, not every third, its random.

gutzeit

unread,
Aug 2, 2011, 6:02:26 AM8/2/11
to akka...@googlegroups.com
Its looks like some internal race condition that occurs before the call to Creator because the log that should be printed in the create() does not, in failing scenario. 

√iktor Ҡlang

unread,
Aug 2, 2011, 6:04:39 AM8/2/11
to akka...@googlegroups.com
And 1.2?

On Tue, Aug 2, 2011 at 12:02 PM, gutzeit <gut...@gmail.com> wrote:
Its looks like some internal race condition that occurs before the call to Creator because the log that should be printed in the create() does not, in failing scenario. 

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/q5X74DGnFtkJ.

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.

gutzeit

unread,
Aug 2, 2011, 6:13:20 AM8/2/11
to akka...@googlegroups.com
I see ... back to compiling akka then. I will let you know the results.

√iktor Ҡlang

unread,
Aug 2, 2011, 6:26:28 AM8/2/11
to akka...@googlegroups.com
Great thanks

On Tue, Aug 2, 2011 at 12:13 PM, gutzeit <gut...@gmail.com> wrote:
I see ... back to compiling akka then. I will let you know the results.

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/D9wrL_RFdtMJ.

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.

gutzeit

unread,
Aug 2, 2011, 6:30:33 AM8/2/11
to akka...@googlegroups.com
Now I have to compile akka-modules as well ... Which fails due to:

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.apache.camel#camel-core;2.7.0: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[warn] :: problems summary ::
[warn] :::: WARNINGS
[warn]  problem while downloading module descriptor: http://repo1.maven.org/mave
n2/org/apache/camel/camel/2.7.0/camel-2.7.0.pom: Read timed out (18899ms)
[warn]  io problem while parsing ivy file: http://repo1.maven.org/maven2/org/apa
che/camel/camel-parent/2.7.0/camel-parent-2.7.0.pom: Impossible to load parent f
or file:/C:/Users/Dima%20Gutzeit/.ivy2/cache/org.apache.camel/camel-parent/ivy-2
.7.0.xml.original. Parent=org.apache.camel#camel;2.7.0
[warn]  io problem while parsing ivy file: http://repo1.maven.org/maven2/org/apa
che/camel/camel-core/2.7.0/camel-core-2.7.0.pom: Impossible to load parent for f
ile:/C:/Users/Dima%20Gutzeit/.ivy2/cache/org.apache.camel/camel-core/ivy-2.7.0.x
ml.original. Parent=org.apache.camel#camel-parent;2.7.0
[warn]          module not found: org.apache.camel#camel-core;2.7.0
[warn]  ==== local: tried
[warn]    C:/Users/Dima Gutzeit/.ivy2/local/org.apache.camel/camel/2.7.0/ivys/iv
y.xml
[warn]    -- artifact org.apache.camel#camel;2.7.0!camel.jar:
[warn]    C:/Users/Dima Gutzeit/.ivy2/local/org.apache.camel/camel/2.7.0/jars/ca
mel.jar
[warn]  ==== Local Maven Repo: tried
[warn]    file:/C:/Users/Dima%20Gutzeit/.m2/repository/org/apache/camel/camel/2.
7.0/camel-2.7.0.pom
[warn]    -- artifact org.apache.camel#camel;2.7.0!camel.jar:
[warn]    file:/C:/Users/Dima%20Gutzeit/.m2/repository/org/apache/camel/camel/2.
7.0/camel-2.7.0.jar
[warn]  ==== Local Release: tried
[warn]    -- artifact org.apache.camel#camel;2.7.0!camel.jar:
[warn]    E:/jboner-akka-modules-d77958f/target/release/1.2-SNAPSHOT/repository/
org/apache/camel/camel/2.7.0/camel-2.7.0.jar
[warn]  ==== public: tried
.pom
[warn]  ==== Scala-Tools Maven2 Repository: tried
/camel-core-2.7.0.pom
[warn]    -- artifact org.apache.camel#camel-core;2.7.0!camel-core.jar:
/camel-core-2.7.0.jar
[warn]          ::::::::::::::::::::::::::::::::::::::::::::::
[warn]          ::          UNRESOLVED DEPENDENCIES         ::
[warn]          ::::::::::::::::::::::::::::::::::::::::::::::
[warn]          :: org.apache.camel#camel-core;2.7.0: not found
[warn]          ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[info] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
[error] sbt.ResolveException: unresolved dependency: org.apache.camel#camel-core
;2.7.0: not found




Meanwhile I will temp. remove dependency of akka-camel from my app to test the initial problem.

gutzeit

unread,
Aug 2, 2011, 6:35:26 AM8/2/11
to akka...@googlegroups.com
Its the same, exception is shorter this time c.c.c.. Happens in 50% of the times.

[ERROR]   [8/2/11 1:22 PM] [pool-3-thread-5] [RemoteServerHandler] null
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at akka.remote.netty.RemoteServerHandler.dispatchToTypedActor(NettyRemoteSupport.scala:1158)
        at akka.remote.netty.RemoteServerHandler.handleRemoteMessageProtocol(NettyRemoteSupport.scala:1024)
        at akka.remote.netty.RemoteServerHandler.messageReceived(NettyRemoteSupport.scala:1006)
        at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:80)
        at org.jboss.netty.channel.StaticChannelPipeline.sendUpstream(StaticChannelPipeline.java:362)
        at org.jboss.netty.channel.StaticChannelPipeline$StaticChannelHandlerContext.sendUpstream(StaticChannelPipeline.java:514)
        at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)
        at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
Caused by: akka.actor.ActorInitializationException: Actor has not been started, you need to invoke 'actor.start()' before using it
[localhost_5fff1e10-bcf1-11e0-9aae-00304861e5e1]
        at akka.actor.ScalaActorRef$class.$qmark(ActorRef.scala:1438)
        at akka.actor.LocalActorRef.$qmark(ActorRef.scala:595)
        at akka.actor.ScalaActorRef$class.$bang$bang$bang(ActorRef.scala:1430)
        at akka.actor.LocalActorRef.$bang$bang$bang(ActorRef.scala:595)
        at akka.actor.ActorAspect.localDispatch(TypedActor.scala:980)
        at akka.actor.TypedActorAspect.dispatch(TypedActor.scala:927)
        at akka.actor.TypedActorAspect.invoke(TypedActor.scala:922)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313706623396_1__521895947__2010469476___AW_JoinPoint.proceed(Unknown Source)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313706623396_1__521895947__2010469476___AW_JoinPoint.invoke(Unknown Source)
        at c.c.c.actors.RemoteGraphService$$ProxiedByAWDelegation$$1313706623396.getContacts(Unknown Source)
        ... 15 more

[GENERIC] [8/2/11 1:22 PM] [RemoteServerError(java.lang.reflect.InvocationTargetException,akka.remote.netty.NettyRemoteSupport@36e3ffdf)]
[GENERIC] [8/2/11 1:23 PM] [RemoteServerClientDisconnected(akka.remote.netty.NettyRemoteSupport@36e3ffdf,Some(/192.168.0.54:57321))]
[GENERIC] [8/2/11 1:23 PM] [RemoteServerClientClosed(akka.remote.netty.NettyRemoteSupport@36e3ffdf,Some(/192.168.0.54:57321))]



Is it my fault ? It looks like a very basic way of using remote actors, and it fails :(((((

√iktor Ҡlang

unread,
Aug 2, 2011, 6:37:35 AM8/2/11
to akka...@googlegroups.com
What if you don't use a FQCN as session-handle?

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/SrLAGNlyJaQJ.

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.

Dima Gutzeit

unread,
Aug 2, 2011, 6:53:15 AM8/2/11
to akka...@googlegroups.com, akka...@googlegroups.com
Not sure what you mean ... 
I am using simpleName which is not FQCN ...

Regards,
Dima Gutzeit.

Sent from my iPhone

√iktor Ҡlang

unread,
Aug 2, 2011, 6:54:43 AM8/2/11
to akka...@googlegroups.com
On Tue, Aug 2, 2011 at 12:53 PM, Dima Gutzeit <gut...@gmail.com> wrote:
Not sure what you mean ... 
I am using simpleName which is not FQCN ...

Ok,

open a ticket with a failing test and I'll have a look at it.
 

gutzeit

unread,
Aug 2, 2011, 7:39:05 AM8/2/11
to akka...@googlegroups.com
I was afraid you would say that ... Its not a simple testcase anymore :)

gutzeit

unread,
Aug 2, 2011, 7:59:12 AM8/2/11
to akka...@googlegroups.com
For what it worth, if client akka instance does not stop the typed actor (remote actor) after finishing with it, the problem does not occur.

√iktor Ҡlang

unread,
Aug 2, 2011, 8:24:18 AM8/2/11
to akka...@googlegroups.com
On Tue, Aug 2, 2011 at 1:59 PM, gutzeit <gut...@gmail.com> wrote:
For what it worth, if client akka instance does not stop the typed actor (remote actor) after finishing with it, the problem does not occur.

When do you stop it?
 

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/tR9qepce8hkJ.

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.

gutzeit

unread,
Aug 2, 2011, 8:34:32 AM8/2/11
to akka...@googlegroups.com
Something like that:


Client side:

Service service = Actors.remote().typedActorFor(actorInterface, actorInterface.getSimpleName(), REMOTE_ACTORS_INVOCATION_TIMEOUT, ip, port);
Future<Object> future = service.doSomething();
future.get();
TypedActor.stop(service);

√iktor Ҡlang

unread,
Aug 2, 2011, 8:39:01 AM8/2/11
to akka...@googlegroups.com

Why are you using a session managed actor and stop it? It will be stopped automatically when the connection drops...
 

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/v94D8-i-vtkJ.

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.

Dima Gutzeit

unread,
Aug 2, 2011, 8:54:38 AM8/2/11
to akka...@googlegroups.com
Ok, I wish documentation stated that :).
Thanks.

2011/8/2 √iktor Ҡlang <viktor...@gmail.com>



--
-- Dima Gutzeit.

√iktor Ҡlang

unread,
Aug 2, 2011, 9:01:46 AM8/2/11
to akka...@googlegroups.com
On Tue, Aug 2, 2011 at 2:54 PM, Dima Gutzeit <gut...@gmail.com> wrote:
Ok, I wish documentation stated that :).
Thanks.

You mean that the following is ambiguous?

" Actors are stopped automatically when the client disconnects."

- http://akka.io/docs/akka/1.1.3/java/remote-actors.html#id19
 

Dima Gutzeit

unread,
Aug 2, 2011, 9:48:58 AM8/2/11
to akka...@googlegroups.com
Nope, its pretty clear. My fault. Sorry.

Nevertheless there is some race condition there, which appears when stopping the actors expicitely. (IMHO it is legal to stop an actor even if its remote, no ? Its the whole concept of remote, it acts exactly as local, which means the stop as well.)

Thank you again for you help.

√iktor Ҡlang

unread,
Aug 2, 2011, 9:56:43 AM8/2/11
to akka...@googlegroups.com
On Tue, Aug 2, 2011 at 3:48 PM, Dima Gutzeit <gut...@gmail.com> wrote:
Nope, its pretty clear. My fault. Sorry.

Nevertheless there is some race condition there, which appears when stopping the actors expicitely. (IMHO it is legal to stop an actor even if its remote, no ? Its the whole concept of remote, it acts exactly as local, which means the stop as well.)

Yeah, it's going to be fixed when we make "stop" asynchronous.
 

Thank you again for you help.

Np,
happy hAkking!

Cheers,

 

gutzeit

unread,
Aug 5, 2011, 4:17:27 AM8/5/11
to akka...@googlegroups.com
I do not want to awaken a sleeping beast but this problem keep occurring:

I have a a remote typed actor which exposes multiple methods.

Some with one parameter and some with multiple. What I noticed that everything works ok when there more than one parameter, first some serializable object and second is a Boolean. Methods with one serializable object parameter are throwing this "actor stopped" exceptions, whenever they feel like it.

What I did is added another Boolean parameter to the method, and the problem does not occur anymore. (at leas not in the test of 10 attempts I tried)

I think I am going insane since I do not understand how can it be related ....

Please, am I normal :) ????

√iktor Ҡlang

unread,
Aug 5, 2011, 4:38:54 AM8/5/11
to akka...@googlegroups.com

Sounds really weird, open a ticket.

Thanks,

 

--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/GP1UTM5BVCAJ.

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.
Reply all
Reply to author
Forward
0 new messages