I ran into a similar issue when packaging an Akka application as a far JAR with all the dependencies merged together, using the Maven assembly plugin instead of SBT.
The underlying issue lies because when packaging a fat JAR, files which reside in the same path (e.g. /reference.conf
) are overwritten by the build system by default. Thus, when using multiple Akka modules, one reference.conf
will end up overwriting all the others, thus you will end up with a single, partial reference.conf
in your JAR file, instead of multiple reference.conf
which are then merged by the config library when it loads them.
This causes the no configuration found errors, because the default configuration settings for some modules (as found in their reference.conf
which was overwritten) are missing.
@ArunavaS answer works for SBT, since it merges the reference.conf
files. If using Maven, then it is possible to configure it to do something similar (e.g. see How can I merge resource files in a Maven assembly?).
Alternatively, instead of using a fat JAR, you can export all the dependencies to a separate folder, and then add them to the classpath when running the JAR file.