No configuration setting found for key 'akka.version'

524 views
Skip to first unread message

Harit Himanshu

unread,
Jun 23, 2015, 12:15:20 PM6/23/15
to akka...@googlegroups.com
Hello there!

I am trying to run akka-remoting and see issues when I try to run it on separate JVM process  

$ java -jar remoting-separate-jvm-1.0-SNAPSHOT-jar-with-dependencies.jar  com.harit.akka.remoting.RemoteApplication ProcessingActor
Hello:com.harit.akka.remoting.RemoteApplication
Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.version'
at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:124)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:145)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:151)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:159)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:164)
at com.typesafe.config.impl.SimpleConfig.getString(SimpleConfig.java:206)
at akka.actor.ActorSystem$Settings.<init>(ActorSystem.scala:169)
at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:505)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:119)
at com.harit.akka.remoting.RemoteApplication$.startProcessingActorSystem(RemoteApplication.scala:29)
at com.harit.akka.remoting.RemoteApplication$.main(RemoteApplication.scala:12)
at com.harit.akka.remoting.RemoteApplication.main(RemoteApplication.scala)

My Remote Application looks like  

object RemoteApplication {
  def main(args: Array[String]): Unit = {
    println("Hello:" + args.head)
    if (args.isEmpty || args(1) == "ProcessingActor")
      startProcessingActorSystem()
    if (args.isEmpty || args(1) == "WatchingActor")
      startWatchingActorSystem()
  }

  def startWatchingActorSystem() = {
    val system = ActorSystem("WatchingSystem", ConfigFactory.load("remotecreation.conf"))
    val watchingActor: ActorRef = system.actorOf(Props[WatchingActor], "watchingActor")
    println("WatchingActorSystem Started")

    import system.dispatcher
    system.scheduler.scheduleOnce(1 second) {
      watchingActor ! TellToProcess
    }
  }

  def startProcessingActorSystem() = {
    val system = ActorSystem("ProcessingSystem", ConfigFactory.load("processing.conf"))
    println("ProcessingActorSystem Started")
  }
}


and I have have dependency on  

<dependency>
   <groupId>com.typesafe.akka</groupId>
   <artifactId>akka-actor_2.11</artifactId>
   <version>2.3.11</version>
</dependency>

Which pulls out the dependency on config.

What is wrong here?

Thanks a lot
+ Harit

Patrik Nordwall

unread,
Jun 24, 2015, 8:06:14 AM6/24/15
to akka...@googlegroups.com
Are you assembling the jar files into one fat jar?
/Patrik

--
>>>>>>>>>> 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 akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
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

Harit Himanshu

unread,
Jun 28, 2015, 6:25:14 PM6/28/15
to akka...@googlegroups.com
I used maven-shade plugin and then it worked

You received this message because you are subscribed to a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/sXohtg035mU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.

Konrad Malawski

unread,
Jun 28, 2015, 6:27:13 PM6/28/15
to akka...@googlegroups.com, Harit Himanshu
Glad that it worked out for you :-)
Thanks for sharing the conclusion!

-- 
Cheers,
Konrad 'ktoso’ Malawski
Akka @ Typesafe

Harit Himanshu

unread,
Jun 28, 2015, 6:32:55 PM6/28/15
to Konrad Malawski, akka...@googlegroups.com
I am however trying with SBT since I want to write multi-jvm test
Reply all
Reply to author
Forward
0 new messages