I am building a native image for a Scala app that uses SimpleConfig.
When I run the native image, I get this error message:
> ./myapp
Exception in thread "main" com.typesafe.config.ConfigException$Missing: system properties: No configuration setting found for key 'eqwalizer'
at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:157)
at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:175)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:189)
at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:194)
at com.typesafe.config.impl.SimpleConfig.getObject(SimpleConfig.java:269)
at com.typesafe.config.impl.SimpleConfig.getConfig(SimpleConfig.java:275)
at com.typesafe.config.impl.SimpleConfig.getConfig(SimpleConfig.java:42)
at com.myapp.package$.config$lzycompute(package.scala:20)
at com.myapp.package$.config(package.scala:19)
at com.myapp.Main$.main(Main.scala:15)
at com.myapp.Main.main(Main.scala)
Is there something I have to do to embed a config file in the native image?
I do not know very much about JVM stuff and no idea what aspects of this problem are to do with sbt vs. jvm vs. graalvm vs. properties files etc.
I get this error regardless of how I build the native image:
- using the
native-imageexecutable directly - using the sbt-native-image plugin