config
config copied to clipboard
NoSuchMethodError
I use akka in spark.When I try to submit my app.It told me this error:
Exception in thread "main" java.lang.NoSuchMethodError: com.typesafe.config.Config.getDuration(Ljava/lang/String;Ljava/util/concurrent/TimeUnit;)J
at com.azavea.shaded.demo.util.Helpers$ConfigOps$.akka$util$Helpers$ConfigOps$$getDuration$extension(Helpers.scala:126)
at com.azavea.shaded.demo.util.Helpers$ConfigOps$.getMillisDuration$extension(Helpers.scala:121)
at com.azavea.shaded.demo.actor.ActorSystem$Settings.<init>(ActorSystem.scala:172)
at com.azavea.shaded.demo.actor.ActorSystemImpl.<init>(ActorSystem.scala:505)
at com.azavea.shaded.demo.actor.ActorSystem$.apply(ActorSystem.scala:142)
at com.azavea.shaded.demo.actor.ActorSystem$.apply(ActorSystem.scala:109)
at geotrellis.chatta.Main$.main(Main.scala:29)
at geotrellis.chatta.Main.main(Main.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 org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:731)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:181)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:206)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:121)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
how can I resolve this?Thanks!
My guess is you need a newer version or have multiple versions on classpath and the wrong one is used. But I don't really know for sure.
and how can I use akka in cdh?somebody said must shade the akka when use sbt?I'm not very clear about that.
These are general scala/java questions, unfortunately I don't know the answers. I would try stackoverflow or perhaps the chat rooms or email lists for the build tool you are using or for akka or spark.
Thanks!
I noticed that there is a similar problem at https://github.com/SquidDev-CC/CC-Tweaked/issues/521. Perhaps we can refer to this issue to find more context about their steps to repair?.