thanks Patrik Nordwall
On Monday, May 29, 2017 at 6:35:54 PM UTC+4:30, [email protected] wrote: > > hi all > this is my code : > > https://github.com/SalmaKhater/Learning-Akka/tree/master/akka-cluster/src/main/scala/load-balancing > and this is my config files in project : > > https://github.com/SalmaKhater/Learning-Akka/tree/master/akka-cluster/src/main/resources > and my sbt file this : > > name := "Akka" > > version := "1.0" > scalaVersion := "2.12.2" > > libraryDependencies ++= Seq( > "com.typesafe.akka" %% "akka-actor" % "2.5.1", > "com.typesafe.akka" %% "akka-remote" % "2.5.1", > "com.typesafe.akka" %% "akka-cluster" % "2.5.1", > "com.typesafe.akka" %% "akka-cluster-sharding" % "2.5.1", > "com.typesafe.akka" %% "akka-cluster-tools" % "2.5.1", > "com.typesafe.akka" %% "akka-persistence" % "2.5.1", > "com.typesafe.akka" %% "akka-contrib" % "2.5.1", > "com.typesafe.akka" % "akka-cluster-metrics_2.12" % "2.5.2", > "org.iq80.leveldb" % "leveldb" % "0.7", > "org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8", > "com.ning" % "async-http-client" % "1.9.40", > "org.jsoup" % "jsoup" % "1.8.1" > ) > > > but when i run project i've got this error : > > > Exception in thread "main" java.lang.IllegalArgumentException: Cannot > instantiate router [adaptive-group], defined in [/frontend/backendRouter], > make sure it extends [interface akka.routing.RouterConfig] and has > constructor with [com.typesafe.config.Config] and optional > [akka.actor.DynamicAccess] parameter > at > akka.actor.Deployer.akka$actor$Deployer$$throwCannotInstantiateRouter$1(Deployer.scala:196) > at > akka.actor.Deployer$$anonfun$createRouterConfig$2.applyOrElse(Deployer.scala:208) > at > akka.actor.Deployer$$anonfun$createRouterConfig$2.applyOrElse(Deployer.scala:201) > at > scala.runtime.AbstractPartialFunction.apply(AbstractPartialFunction.scala:34) > at scala.util.Failure.recover(Try.scala:230) > at akka.actor.Deployer.createRouterConfig(Deployer.scala:201) > at akka.actor.Deployer.parseConfig(Deployer.scala:168) > at akka.remote.RemoteDeployer.parseConfig(RemoteDeployer.scala:26) > at > akka.cluster.ClusterDeployer.parseConfig(ClusterActorRefProvider.scala:76) > at akka.actor.Deployer.$anonfun$new$1(Deployer.scala:145) > at > scala.collection.TraversableLike.$anonfun$flatMap$1(TraversableLike.scala:241) > at scala.collection.Iterator.foreach(Iterator.scala:929) > at scala.collection.Iterator.foreach$(Iterator.scala:929) > at scala.collection.AbstractIterator.foreach(Iterator.scala:1417) > at scala.collection.IterableLike.foreach(IterableLike.scala:71) > at scala.collection.IterableLike.foreach$(IterableLike.scala:70) > at scala.collection.AbstractIterable.foreach(Iterable.scala:54) > at scala.collection.TraversableLike.flatMap(TraversableLike.scala:241) > at scala.collection.TraversableLike.flatMap$(TraversableLike.scala:238) > at scala.collection.AbstractTraversable.flatMap(Traversable.scala:104) > at akka.actor.Deployer.<init>(Deployer.scala:143) > at akka.remote.RemoteDeployer.<init>(RemoteDeployer.scala:23) > at akka.cluster.ClusterDeployer.<init>(ClusterActorRefProvider.scala:63) > at > akka.cluster.ClusterActorRefProvider.createDeployer(ClusterActorRefProvider.scala:54) > at > akka.cluster.ClusterActorRefProvider.createDeployer(ClusterActorRefProvider.scala:23) > at > akka.remote.RemoteActorRefProvider.<init>(RemoteActorRefProvider.scala:138) > at > akka.cluster.ClusterActorRefProvider.<init>(ClusterActorRefProvider.scala:28) > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > at > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) > at > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > at java.lang.reflect.Constructor.newInstance(Constructor.java:423) > at > akka.actor.ReflectiveDynamicAccess.$anonfun$createInstanceFor$1(ReflectiveDynamicAccess.scala:32) > at scala.util.Try$.apply(Try.scala:209) > at > akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:27) > at > akka.actor.ReflectiveDynamicAccess.$anonfun$createInstanceFor$4(ReflectiveDynamicAccess.scala:38) > at scala.util.Success.flatMap(Try.scala:247) > at > akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:38) > at akka.actor.ActorSystemImpl.liftedTree1$1(ActorSystem.scala:750) > at akka.actor.ActorSystemImpl.<init>(ActorSystem.scala:743) > at akka.actor.ActorSystem$.apply(ActorSystem.scala:244) > at akka.actor.ActorSystem$.apply(ActorSystem.scala:287) > at akka.actor.ActorSystem$.apply(ActorSystem.scala:262) > at com.packt.akka.loadBalancing.Backend$.initiate(Backend.scala:25) > at > com.packt.akka.loadBalancing.LoadBalancingApp$.delayedEndpoint$com$packt$akka$loadBalancing$LoadBalancingApp$1(LoadBalancingApp.scala:8) > at > com.packt.akka.loadBalancing.LoadBalancingApp$delayedInit$body.apply(LoadBalancingApp.scala:4) > at scala.Function0.apply$mcV$sp(Function0.scala:34) > at scala.Function0.apply$mcV$sp$(Function0.scala:34) > at > scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:12) > at scala.App.$anonfun$main$1$adapted(App.scala:76) > at scala.collection.immutable.List.foreach(List.scala:389) > at scala.App.main(App.scala:76) > at scala.App.main$(App.scala:74) > at > com.packt.akka.loadBalancing.LoadBalancingApp$.main(LoadBalancingApp.scala:4) > at > com.packt.akka.loadBalancing.LoadBalancingApp.main(LoadBalancingApp.scala) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) > Caused by: java.lang.ClassNotFoundException: adaptive-group > at java.net.URLClassLoader.findClass(URLClassLoader.java:381) > at java.lang.ClassLoader.loadClass(ClassLoader.java:424) > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) > at java.lang.ClassLoader.loadClass(ClassLoader.java:357) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Class.java:348) > at > akka.actor.ReflectiveDynamicAccess.$anonfun$getClassFor$1(ReflectiveDynamicAccess.scala:21) > at scala.util.Try$.apply(Try.scala:209) > at > akka.actor.ReflectiveDynamicAccess.getClassFor(ReflectiveDynamicAccess.scala:20) > at > akka.actor.ReflectiveDynamicAccess.createInstanceFor(ReflectiveDynamicAccess.scala:38) > ... 54 more > > > how can resolve this error ? > > > > > > -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
