Configuration error when deploying Akka application in fat jar on Jboss

Hello there,

I’m trying to deploy an Akka application in Scala on a Jboss server using sbt assembly.

I have a configuration file named application.conf under resources folder and after the assembly, it is correctly packaged inside the jar with the concat strategy. However, at application startup I get this error :

09:53:36,114 WARN  [org.keycloak.services] (default task-236) KC-SERVICES0013: Failed authentication: com.typesafe.config.ConfigException$Missing: No configuration setting found for key 'akka'
	at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:156)
	at com.typesafe.config.impl.SimpleConfig.findKey(SimpleConfig.java:149)
	at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:176)
	at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:188)

It seems that the configuration file in the jar is not loaded at all. Any idea on how to solve this ?

I’m having a very similar problem but, instead of not finding the akka key, it is not finding the keys for akka.loggers, and if I give a value for akka.loggers, it moves on to akka.logging-filter, and so on. Based on this, I tried implementing a concrete .conf file containing all the default configuration data from the default configuration found here. After loading this as the fallback of my intended application.conf, I receive the same error, except the missing key is enabled, as shown below.

No answer was ever given here, but has anyone found a solution to this issue?

Exception in thread "main" com.typesafe.config.ConfigException$Missing: merge of String: 2-4,kryoserialize.conf @ jar:file:/users/khardee/AkkaClusterRayTracing/target/scala-2.12/AkkaRayTracing-assembly-1.0.jar!/kryoserialize.conf: 51: No configuration setting found for key 'enabled'
        at com.typesafe.config.impl.SimpleConfig.findKeyOrNull(SimpleConfig.java:156)
        at com.typesafe.config.impl.SimpleConfig.findOrNull(SimpleConfig.java:174)
        at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:188)
        at com.typesafe.config.impl.SimpleConfig.find(SimpleConfig.java:193)
        at com.typesafe.config.impl.SimpleConfig.getBoolean(SimpleConfig.java:218)
        at akka.remote.artery.ArterySettings.<init>(ArterySettings.scala:35)
        at akka.remote.artery.ArterySettings$.apply(ArterySettings.scala:240)
        at akka.remote.RemoteSettings.<init>(RemoteSettings.scala:28)
        at akka.remote.RemoteActorRefProvider.<init>(RemoteActorRefProvider.scala:160)
        at akka.cluster.ClusterActorRefProvider.<init>(ClusterActorRefProvider.scala:46)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at akka.actor.ReflectiveDynamicAccess.$anonfun$createInstanceFor$1(ReflectiveDynamicAccess.scala:40)
        at scala.util.Try$.apply(Try.scala:213)
        at akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:35)
        at akka.actor.ReflectiveDynamicAccess.$anonfun$createInstanceFor$5(ReflectiveDynamicAccess.scala:48)
        at scala.util.Success.flatMap(Try.scala:251)
        at akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:47)
        at akka.actor.ActorSystemImpl.liftedTree1$1(ActorSystem.scala:933)
        at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:926)
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:272)
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:316)
        at akka.actor.ActorSystem$.apply(ActorSystem.scala:290)
        at acrt.cluster.untyped.RaytracingMain$.startup(RaytracingMain.scala:70)
        at acrt.cluster.untyped.RaytracingMain$.main(RaytracingMain.scala:51)
        at acrt.cluster.untyped.RaytracingMain.main(RaytracingMain.scala)