Writing this for users who have future issues like me. Libraries that are built on Typesafe configs typically use their own reference.conf files and reference specific configuration keys. When creating a fat JAR using the Gradle shadowJAR these files are not included.
Dependencies such as Spray and Akka cause errors when trying to run the JAR. Errors look like this:
Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'spray' Exception in thread "main" com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka'
How to fix it? Check out the answer below.
source share