error while starting up loggers

I’m NB in akka/scala. I added a logger config under src/resources/application.conf
I’m getting the below error. I only want to know is this a runtime error of compilation error?

Thanks!

[info] Loading project definition from D:\OU RA\RA\2020 Summer\AKKA Examples
\SachaBarber.AkkaExamples-master\Logging - Copy\project
[info] Set current project to HelloWorld (in build file:/D:/OU%20RA/RA/2020%
20Summer/AKKA%20Examples/SachaBarber.AkkaExamples-master/Logging%20-%20Copy/)
[info] Compiling 1 Scala source to D:\OU RA\RA\2020 Summer\AKKA Examples\Sac
haBarber.AkkaExamples-master\Logging - Copy\target\scala-2.11\classes…
[info] Running com.example.Main
error while starting up loggers
akka.ConfigurationException: Logger specified in config can’t be loaded [akka.actor.ActorRef] due to [java.lang.ClassCastException: interface akka.actor.Actor is not assignable from class akka.actor.ActorRef]
at akka.event.LoggingBus$$anonfun$4$$anonfun$apply$1.applyOrElse(Logging.scala:118)
at akka.event.LoggingBus$$anonfun$4$$anonfun$apply$1.applyOrElse(Logging.scala:117)
at scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:36)
at scala.util.Failure$$anonfun$recover$1.apply(Try.scala:216)
at scala.util.Try$.apply(Try.scala:192)
at scala.util.Failure.recover(Try.scala:216)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:117)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:112)
at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:683)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:682)
at akka.event.LoggingBus$class.startDefaultLoggers(Logging.scala:112)
at akka.event.EventStream.startDefaultLoggers(EventStream.scala:28)
at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:667)
at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:648)
at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:645)
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:645)
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:661)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:109)
at com.example.Main$.delayedEndpoint$com$example$Main$1(helloWorldActor.scala:25)
at com.example.Main$delayedInit$body.apply(helloWorldActor.scala:20)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at com.example.Main$.main(helloWorldActor.scala:20)
at com.example.Main.main(helloWorldActor.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sbt.Run.invokeMain(Run.scala:67)
at sbt.Run.run0(Run.scala:61)
at sbt.Run.sbt$Run$$execute$1(Run.scala:51)
at sbt.Run$$anonfun$run$1.apply$mcV$sp(Run.scala:55)
at sbt.Run$$anonfun$run$1.apply(Run.scala:55)
at sbt.Run$$anonfun$run$1.apply(Run.scala:55)
at sbt.Logger$$anon$4.apply(Logger.scala:85)
at sbt.TrapExit$App.run(TrapExit.scala:248)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: interface akka.actor.Actor is not assignable from class akka.actor.ActorRef
at akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(ReflectiveDynamicAccess.scala:23)
at akka.actor.ReflectiveDynamicAccess$$anonfun$getClassFor$1.apply(ReflectiveDynamicAccess.scala:20)
at scala.util.Try$.apply(Try.scala:192)
at akka.actor.ReflectiveDynamicAccess.getClassFor(ReflectiveDynamicAccess.scala:20)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:115)
… 40 more
[error] (run-main-0) akka.ConfigurationException: Could not start logger du
e to [akka.ConfigurationException: Logger specified in config can’t be loaded [akka.actor.ActorRef] due to [java.lang.ClassCastException: interface akka.actor.Actor is not assignable from class akka.actor.ActorRef]]
akka.ConfigurationException: Could not start logger due to [akka.ConfigurationException: Logger specified in config can’t be loaded [akka.actor.ActorRef] due to [java.lang.ClassCastException: interface akka.actor.Actor is not assignable from class akka.actor.ActorRef]]
at akka.event.LoggingBus$class.startDefaultLoggers(Logging.scala:146)
at akka.event.EventStream.startDefaultLoggers(EventStream.scala:28)
at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:667)
at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:648)
at akka.actor.ActorSystemImpl._start$lzycompute(ActorSystem.scala:645)
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:645)
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:661)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:142)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:109)
at com.example.Main$.delayedEndpoint$com$example$Main$1(helloWorldActor.scala:25)
at com.example.Main$delayedInit$body.apply(helloWorldActor.scala:20)
at scala.Function0$class.apply$mcV$sp(Function0.scala:34)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.App$$anonfun$main$1.apply(App.scala:76)
at scala.collection.immutable.List.foreach(List.scala:381)
at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
at scala.App$class.main(App.scala:76)
at com.example.Main$.main(helloWorldActor.scala:20)
at com.example.Main.main(helloWorldActor.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
[trace] Stack trace suppressed: run last compile:run for the full
output.
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
[trace] Stack trace suppressed: run last compile:run for the full
output.
[error] (compile:run) Nonzero exit code: 1
[error] Total time: 7 s, completed Jun 20, 2020 9:44:58 PM

Hi Anas,

This is a runtime error which indicates your configuration is broken.

Please make sure you have a logging backend configured as shown in
https://doc.akka.io/docs/akka/snapshot/typed/logging.html#slf4j-backend

and select the SLF4J logger in your application.conf

akka {
loggers = [“akka.event.slf4j.Slf4jLogger”]
loglevel = “DEBUG”
}

I hope this brings your forward in exploring Akka,
Enno.