Hi Hyunsok,

it seems that this code works when executed not in Scala Console. Also it
works when executed in Scala Console but using Scala 2.10.x so my best
guess is that it is Scala Console problem.

I have posted about this
<https://groups.google.com/forum/#!topic/scala-user/lg24YxHfjnE> to the
scala-user group.


On Sat, Aug 30, 2014 at 5:17 AM, Hyunsok Oh <[email protected]> wrote:

> Hi,
>
> I'm newbie to akka and trying to follow akka guide from the akka homepage.
>
> During playing with akka ActorDSL, I found my JVM shutting down when I use
> :
>
> import akka.actor._
> import ActorDSL._
> implicit val system = ActorSystem("demo")
> val x = actor( new Act { whenStarting { println("Hello") }} )
>
>
> As you know, this simple code snippet shoud print "Hello". But all I can
> see was at the bottom of this message.
>
> I ran this code on my Windows 8(64 bit) PC, scala 2.11.1, Java
> 1.7.0_67(64bit), 1.8.0_05. And I checked it on my mac (Mac OS X 10.9.4,
> scala 2.11.1,  Java 1.7.0_25.
>
> Is there anything I missed?
>
> Thank you.
>
> - Hyunsok
>
> scala> Uncaught error from thread [demo-akka.actor.default-dispatcher-2]
> shuttin
> g down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for
> ActorSystem[demo]
>
> java.lang.AbstractMethodError: $line12.$read$$iw$$iw$$iw$$iw$
> $iw$$iw$$anonfun$2$
> $anon$1.akka$actor$dsl$Creators$Act$$preStartFun_$eq(Lscala/Function0;)V
>         at akka.actor.dsl.Creators$Act$class.$init$(Creators.scala:44)
>         at $line12.$read$$iw$$iw$$iw$$iw$$iw$$iw$$anonfun$2$$anon$1.<
> init>(<cons
> ole>:14)
> [ERROR] [08/30/2014 10:25:39.562] [demo-akka.actor.default-dispatcher-2]
> [ActorS
> ystem(demo)] Uncaught error from thread [demo-akka.actor.default-dispatcher-2]
> s
> hutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled
> java.lang.AbstractMethodError: $line12.$read$$iw$$iw$$iw$$iw$
> $iw$$iw$$anonfun$2$
> $anon$1.akka$actor$dsl$Creators$Act$$preStartFun_$eq(Lscala/Function0;)V
>         at akka.actor.dsl.Creators$Act$class.$init$(Creators.scala:44)
>         at $line12.$read$$iw$$iw$$iw$$iw$$iw$$iw$$anonfun$2$$anon$1.<
> init>(<cons
> ole>:14)
>         at $line12.$read$$iw$$iw$$iw$$iw$$iw$$iw$$anonfun$2.apply(<
> console>:14)
>         at $line12.$read$$iw$$iw$$iw$$iw$$iw$$iw$$anonfun$2.apply(<
> console>:14)
>         at akka.actor.TypedCreatorFunctionConsumer.
> produce(Props.scala:340)
>         at akka.actor.Props.newActor(Props.scala:249)
>         at akka.actor.ActorCell.newActor(ActorCell.scala:552)
>         at akka.actor.ActorCell.create(ActorCell.scala:578)
>         at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
>         at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
>         at akka.dispatch.Mailbox.processAllSystemMessages(
> Mailbox.scala:263)
>         at akka.dispatch.Mailbox.run(Mailbox.scala:219)
>         at akka.dispatch.ForkJoinExecutorConfigurator$
> AkkaForkJoinTask.exec(Abst
> ractDispatcher.scala:393)
>         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:19
> 79)
>         at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(
> ForkJoinWorkerThre
> ad.java:107)
>
>         at $line12.$read$$iw$$iw$$iw$$iw$$iw$$iw$$anonfun$2.apply(<
> console>:14)
>         at $line12.$read$$iw$$iw$$iw$$iw$$iw$$iw$$anonfun$2.apply(<
> console>:14)
>         at akka.actor.TypedCreatorFunctionConsumer.
> produce(Props.scala:340)
>         at akka.actor.Props.newActor(Props.scala:249)
>         at akka.actor.ActorCell.newActor(ActorCell.scala:552)
>         at akka.actor.ActorCell.create(ActorCell.scala:578)
>         at akka.actor.ActorCell.invokeAll$1(ActorCell.scala:456)
>         at akka.actor.ActorCell.systemInvoke(ActorCell.scala:478)
>         at akka.dispatch.Mailbox.processAllSystemMessages(
> Mailbox.scala:263)
>         at akka.dispatch.Mailbox.run(Mailbox.scala:219)
>         at akka.dispatch.ForkJoinExecutorConfigurator$
> AkkaForkJoinTask.exec(Abst
> ractDispatcher.scala:393)
>         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:19
> 79)
>         at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(
> ForkJoinWorkerThre
> ad.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.
>



-- 
Martynas Mickevičius
Typesafe <http://typesafe.com/> – Reactive
<http://www.reactivemanifesto.org/> Apps on the JVM

-- 
>>>>>>>>>>      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