java - Akka based Runnable Jar -
i'm trying run runnable jar command line has embedded in several akka processes. although i'm not original author of application know code run quite happily in eclipse. when try export , run runnable jar, falls on after period of time , thats when start initiate akka processes. running using java 8
java -jar something.jar {options}
error:
@ akka.actor.actorinitializationexception$.apply(actor.scala:174) @ akka.actor.actorcell.create(actorcell.scala:607) @ akka.actor.actorcell.invokeall$1(actorcell.scala:461) @ akka.actor.actorcell.systeminvoke(actorcell.scala:483) @ akka.dispatch.mailbox.processallsystemmessages(mailbox.scala:282) @ akka.dispatch.mailbox.run(mailbox.scala:223) @ akka.dispatch.mailbox.exec(mailbox.scala:234) @ scala.concurrent.forkjoin.forkjointask.doexec(forkjointask.java:260) @ scala.concurrent.forkjoin.forkjoinpool$workqueue.runtask(forkjoinpool.java:1339) @ scala.concurrent.forkjoin.forkjoinpool.runworker(forkjoinpool.java:1979) @ scala.concurrent.forkjoin.forkjoinworkerthread.run(forkjoinworkerthread.java:107) caused by: akka.configurationexception: actorsystem [akka://clustersystem] needs have 'clusteractorrefprovider' enabled in configuration, uses [akka.actor.localactorrefprovider] @ akka.cluster.cluster.<init>(cluster.scala:71) @ akka.cluster.cluster$.createextension(cluster.scala:34) @ akka.cluster.cluster$.createextension(cluster.scala:29) @ akka.actor.actorsystemimpl.registerextension(actorsystem.scala:737) @ akka.actor.extensionid$class.apply(extension.scala:79) @ akka.cluster.cluster$.apply(cluster.scala:29) @ akka.actor.extensionid$class.get(extension.scala:91) @ akka.cluster.cluster$.get(cluster.scala:30) @ akka.cluster.cluster.get(cluster.scala) @ com.dynniq.its.csm.core.akka.actor.prestart(actor.java:93) @ akka.actor.actor$class.aroundprestart(actor.scala:489) @ akka.actor.untypedactor.aroundprestart(untypedactor.scala:95) @ akka.actor.actorcell.create(actorcell.scala:590) @override public void prestart() { **cluster = cluster.get(getcontext().system());** cluster.subscribe(getself(), memberup.class); prestartextra(); }
but seems work in eclipse environment. doing wrong?
thanks in advance.
the answer in middle of error message:
caused by: akka.configurationexception: actorsystem [akka://clustersystem] needs have 'clusteractorrefprovider' enabled in configuration, uses [akka.actor.localactorrefprovider]
a simple clustering config looks this, note akka.actor.provider setting:
http://doc.akka.io/docs/akka/2.1.2/cluster/cluster-usage-scala.html
akka { actor { provider = "akka.cluster.clusteractorrefprovider" } remote { transport = "akka.remote.netty.nettyremotetransport" log-remote-lifecycle-events = off netty { hostname = "127.0.0.1" port = 0 } } cluster { seed-nodes = [ "akka://clustersystem@127.0.0.1:2551", "akka://clustersystem@127.0.0.1:2552"] auto-down = on } }
the config bit different in newer versions of akka, see details in http://doc.akka.io/docs/akka/current/scala/cluster-usage.html
actor { provider = "cluster" }
so app either can't read application.conf resources reason or configuration file not passed parameter java -jar
Comments
Post a Comment