NoSuchMethodError with Play - scala

I encountered a strange error with Play.
All my tests are OK, but when I run, I have the following error :
java.lang.NoSuchMethodError: controllers.package$.tuple2Writes(Lplay/api/libs/json/Writes;Lplay/api/libs/json/Writes;)Lplay/api/libs/json/Writes;
This method is defined in a package object.
sbt clean doesn't fix

Related

Class not Found Error when updated kafka_2.12 dependency

I updated the dependency in my build.gradle file from kafka_2.11 to kafka_2.12.
I am getting the following error when I try to run a testcase after this :
java.lang.NoClassDefFoundError: scala/collection/TraversableOnce$class

How to fix initialization of Logger error while using spark-submit command

I've got the problem when run my spark-jdbc job to connect to another db. But I've got error before.
Exception in thread "main" java.lang.AbstractMethodError
at org.apache.spark.internal.Logging$class.initializeLogIfNecessary(Logging.scala:99)
My Logger wesn't able to be initialized by scala.
I'm using scala 2.11 and spark with the same versions.
Can't debug this issue via IDE, cause there all is fine, but when I run spark-submit, then error happens.
Got the same error while using Spark 2.3 and I should've been using Spark 2.2. Apparently that method was made abstract in the later version so I was getting that error.
Try this

akka-kryo-serialization ClassNotFoundException: scala.Enumeration$Val

Sometimes when updating a dependency version for my project, when I would run the project I would get the following error:
ERROR 09:31:34:241 apply$mcV$sp - Class could not be loaded and/or registered: scala.Enumeration$Val
ERROR 09:31:34:247 apply$mcV$sp - exception caught during akka-kryo-serialization startup: java.lang.ClassNotFoundException: scala.Enumeration$Val
java.lang.RuntimeException: Nonzero exit code: 1
at scala.sys.package$.error(package.scala:27)
I usually got lucky and was able to fix this by tweaking the versions of my dependencies.
Until I updated my akka version from 2.3.6 to 2.3.12, specifically akka-contrib which contains akka-cluster, akka-remote and akka-peristance.
Turns out that the problem was actually occurring during the transition between akka 2.3.8 and 2.3.9. Looking at the change log, I found that between these two versions the Scala version was upgraded from 2.11.4 to 2.11.5.
My project was building on scala 2.11.4. Upgrading to 2.11.5 fixed the problem.
I couldn't find any help online for this, and lost a couple days trying to figure this out. I'm hoping that this will help someone else out.

Scalacl compiling error

I am attempting to use scalacl. I have added scalacl as an Xplugin for my project, but when I do it gives me two errors:
1) Error in Scala compiler: null
2) SBT builder crashed while compiling. The error message is 'null'. Check Error Log for details.
It also gives this error in a pop-up window:
An internal error occurred during: "Compute launch button tooltip".
Scala compiler cannot initialize for project: HelloWorld. Please check that your classpath contains the standard Scala library.

java.lang.NoSuchMethodError: com.google.common.collect.Maps.safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;

I am using guava-13.0.jar.
It is included in the classpath.
I am using netbeans Java Free Form Project.
Though I clean-build the project, I am getting the following exception.
Uncaught exception in thread main
java.lang.NoSuchMethodError: com.google.common.collect.Maps.safeGet(Ljava/util/Map;Ljava/lang/Object;)Ljava/lang/Object;
at com.google.common.collect.StandardTable.get(StandardTable.java:117)
at com.google.common.collect.HashBasedTable.get(HashBasedTable.java:135)
Can someone point out how can I fix this error?