resource.conf conflicts in fat jar (I think)

131 views
Skip to first unread message

Zach Cox

unread,
Feb 2, 2012, 12:37:15 AM2/2/12
to akka...@googlegroups.com
Hi - I have a very simple app using 2.0-M3 to test out remote actors, using the same .conf settings as the Remoting docs. If I just sbt run the app, or if I use sbt console, then everything works great. But when I sbt assembly up a fat jar and run the app using java -jar, I get exceptions about missing config settings, like this:

Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka.remote.failure-detector.threshold'

If I add akka.remote.failure-detector.threshold into application.conf, then I just get another exception about a different missing setting.

I'm guessing that multiple resource.conf files are conflicting in the fat jar, as in this thread:

https://groups.google.com/forum/#!searchin/akka-user/conf$20jar/akka-user/P6QkNsYEw5c/7OZuwEsXseIJ

I'm not really seeing how to use the solution in that thread with the sbt 0.7 assembly plugin. Is there any standard procedure for creating fat jars with Akka 2.0 to avoid this resource.conf conflict problem?

Thanks,
Zach

Patrik Nordwall

unread,
Feb 2, 2012, 1:50:32 AM2/2/12
to akka...@googlegroups.com
You have already found the other thread that is the best way to solve it, if fat jar is to be used. The problem is that all reference.conf files are not know at akka build time, since additional modules can have their own. So the reference.conf files must be merged at application build time. I don't know how that works together with that specific plugin. May I ask why you need to use fat jar?


--
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/-/1kNgEk5098EJ.
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.



--

Patrik Nordwall
Typesafe The software stack for applications that scale
Twitter: @patriknw


Reply all
Reply to author
Forward
0 new messages