I have started to extract some functionality into a separate Play module, together with some default configuration that I put into a file conf/reference.conf in the module as described for Typesafe’s Config library. This configuration gets picked up just fine, e.g. by functional tests run within the context of the module.
But I seem to be running into some classloader issues once I try to start the application depending on said module, e.g. I get some strange complaint from the Akka subsystem:
No configuration setting found for key 'akka.version'
This exception goes away once I remove the file reference.conf from my module (no other changes), but then obviously the application will not work any more. Currently, the module configuration is in a file conf/module-reference.conf which I include in the main app’s configuration. This works, but I would like to get rid of the include.
I suspect that my reference.conf somehow shadows the one provided by Akka. Did anybody run into this issue before? And what is the best way to solve this?
It looks like I am victim of some strange file system inconsistencies:
play publish-locallyplay eclipsify)Workaround:
Using this procedure, the application’s configuration works fine.
Tip
While looking into this issue, I came across a useful feature of Typesafe’s Config library. You can obtain the whole configuration tree including where each entry comes from using the following line of code:
and e.g. dump this to a file for further analysis.