(run-main-0) java.lang.NoSuchMethodError - scala

I got a problem when I used sbt to run a spark job, I have finish compile, but when I run the command run, I got the problem below
[error] (run-main-0) java.lang.NoSuchMethodError: scala.collection.immutable.HashSet$.empty()Lscala/collection/immutable/HashSet;
java.lang.NoSuchMethodError: scala.collection.immutable.HashSet$.empty()Lscala/collection/immutable/HashSet;
at akka.actor.ActorCell$.<init>(ActorCell.scala:305)
at akka.actor.ActorCell$.<clinit>(ActorCell.scala)
at akka.actor.RootActorPath.$div(ActorPath.scala:152)
at akka.actor.LocalActorRefProvider.<init>(ActorRefProvider.scala:465)
at akka.remote.RemoteActorRefProvider.<init>(RemoteActorRefProvider.scala:124)
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:422)
at akka.actor.ReflectiveDynamicAccess$$anonfun$createInstanceFor$2.apply(DynamicAccess.scala:78)
at scala.util.Try$.apply(Try.scala:191)
Anyone knows what should I do?

I met with the same error when I used scala-library-2.11 jar But when I replaced it with scala-library-2.10 jar . It runs fine

It is probably caused by using incompatible versions of Scala. When I downgraded from Scala 2.11 to 2.10, I forgot to modify one package version (so one package used 2.11, the rest 2.10), resulting in having the same error.
Note: I only had this problem when using IntelliJ.

If you are getting the error and here because you cannot run Jupiter notebooks with Spark 2.1 and Scala 2.11 below is how I was able to make it work. Assumes you installed Jupiter and toree
Pre-req -
Make sure Docker is running else Make fails.
Make sure gpg is installed else Make fails.
Build steps -
export SPARK_HOME=/Users/<path>/spark-2.1.0-hadoop2.7/
git clone https://github.com/apache/incubator-toree.git
cd incubator-toree
make clean release APACHE_SPARK_VERSION=2.1.0
pip install --upgrade ./dist/toree-pip/toree-0.2.0.dev1.tar.gz
pip freeze |grep toree
jupyter toree install --spark_home=$SPARK_HOME
========================================================================
To Start the notebook -
SPARK_OPTS='--master=local[4]' jupyter notebook

I used these versions and everything works now.
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>2.11.6</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>2.3.11</version>
</dependency>

Check whether the scala version you are using corresponds to the precompiled spark version.

The issue could be reproduced with version 2.11.8.
By the moment, no downgrade is required.
Just update scala-library version to 2.12.0.

I've the exactly the same problem and got it fixed by downgrading scala 2.11.8 to 2.10.6.

I've the same issue but where do i alter the scala-library version?
Installation (on Ubuntu 16.04):
sudo apt-get install oracle-java8-installer
wget http://d3kbcqa49mib13.cloudfront.net/spark-2.0.2-bin-hadoop2.7.tgz && tar xvf spark-2.0.2-bin-hadoop2.7.tgz
pip install toree && jupyter toree install
So when I start with a notebook it tells me that I use a different scala version. But I haven't installed anything else.
screenshot + scala version
My spark jars folder contains an scala-library-2.11.8.jar file. But how tell torree to use that (or another) file for scala.

To me both scala versions 2.11 and 2.12 dint work , downgrading to 2.10.3 worked

Related

Which SBT version should I install so as to package, assemble Spark 1.6 programmes

I am using cloudera 5.13.0 version and spark 1.6.0. If I want to use sbt tool inside the cloudera vm which version of sbt/scala I have to install?
You can download the latest version (1.2.3) of sbt in Cloudera. Sbt link here.
Use 0.13.x for SBT is my advice. You can indicate that regardless of SBT installation. Has nothing to do with Cloudera by the way. Scala 2.10.

could not access AnyRef in package Scala

I'm using apache toree (version from github). When i'm trying to execute a query against a postgresql table, i'm getting intermittent scala compiler errors (when i run the same cell twice, the errors are gone and the code runs fine).
I am looking for advice on how to debug these errors. The errors look weird (they appear in the notebook nog on stdout).
error: missing or invalid dependency detected while loading class file 'QualifiedTableName.class'.
Could not access type AnyRef in package scala,
because it (or its dependencies) are missing. Check your build definition for
missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
A full rebuild may help if 'QualifiedTableName.class' was compiled against an incompatible version of scala.
error: missing or invalid dependency detected while loading class file 'FunctionIdentifier.class'.
Could not access type AnyRef in package scala,
because it (or its dependencies) are missing. Check your build definition for
missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
A full rebuild may help if 'FunctionIdentifier.class' was compiled against an incompatible version of scala.
error: missing or invalid dependency detected while loading class file 'DefinedByConstructorParams.class'.
...
The code is simple: extract a dataset from a postgres table:
%AddDeps org.postgresql postgresql 42.1.4 --transitive
val props = new java.util.Properties();
props.setProperty("driver","org.postgresql.Driver");
val df = spark.read.jdbc(url = "jdbc:postgresql://postgresql/database?user=user&password=password",
table = "table", predicates = Array("1=1"), connectionProperties = props)
df.show()
i checked for the obvious (both toree and apache spark use scala 2.11.8, i built apache toree with APACHE_SPARK_VERSION=2.2.0 which is the same as the spark i donwloaded)
For reference, this is the part of the Dockerfile i used to set up toree and spark:
RUN wget https://d3kbcqa49mib13.cloudfront.net/spark-2.2.0-bin-hadoop2.7.tgz && tar -zxf spark-2.2.0-bin-hadoop2.7.tgz && chmod -R og+rw /opt/spark-2.2.0-bin-hadoop2.7 && chown -R a1414.a1414 /opt/spark-2.2.0-bin-hadoop2.7
RUN (curl https://bintray.com/sbt/rpm/rpm > /etc/yum.repos.d/bintray-sbt-rpm.repo)
RUN yum -y install --nogpgcheck sbt
RUN (unset http_proxy; unset https_proxy; yum -y install --nogpgcheck java-1.8.0-openjdk-devel.i686)
RUN (git clone https://github.com/apache/incubator-toree && cd incubator-toree && make clean release APACHE_SPARK_VERSION=2.2.0 ; exit 0)
RUN (. /opt/rh/rh-python35/enable; cd /opt/incubator-toree/dist/toree-pip ;python setup.py install)
RUN (. /opt/rh/rh-python35/enable; jupyter toree install --spark_home=/opt/spark-2.2.0-bin-hadoop2.7 --interpreters=Scala)
I had a similar issue, but it appeared to resolve itself by merely reevaluating the cell in the Jupyter notebook, or by restarting the kernel and then reevaluating the cell. Annoying.
As said in cchantep's comment, you are probably using a different Scala version than the one used to build Spark.
The easiest solution is to check which one is used by Spark, and switch to this one, eg on Mac:
brew switch scala 2.11.8

Failed to %AddDeps HBase 1.3.1 from Jupyter-Toree-Scala

I'm using this jupyter toree notebook in a docker container (https://github.com/jupyter/docker-stacks/tree/master/all-spark-notebook).
I tried to add HBASE dependency with this %AddDeps command in the notebook:
%AddDeps org.apache.hbase hbase 1.3.1 --transitive --verbose
All dependencies seem to be found, yet I still get this output (null error?):
Magic AddDeps failed to execute with error:
null
I can't call import org.apache.hadoop.hbase subsequently, meaning that the library isn't installed yet. I'd really appreciate any advice, thanks.
I solved this issue. Imported the wrong project-name. Should've been %AddDeps org.apache.hbase hbase-client 1.2.0 --transitive

Installing Scala using Nix on macOS Sierra

I would like to install either OpenJDK 8 or Oracle JDK 8 along with Scala using Nix.
I started by installing the Oracle JDK directly. Then I installed scala via Nix by running nix-env -i scala. This completed.
However, running scalac fails:
% scala
Exception in thread "main" java.lang.UnsupportedClassVersionError: scala/tools/nsc/MainGenericRunner : Unsupported major.minor version 52.0
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1070)
at java.lang.ClassLoader.loadClass(ClassLoader.java:414)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
I do have JAVA_HOME set:
% echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home
To reiterate, I want to install Scala via Nix. I'm like to learn one or more ways to do it. Some notes:
I'm happy to learn more about how Nix packages work if needed.
I haven't gotten a clear, authoritative explanation of how to install the JDK via Nix on macOS. This seems to be a key part of the story.
First, I uninstalled scala with nix-env --uninstall scala.
Then I updated my ~/.nixpkgs/config.nix to include:
{
packageOverrides = pkgs: {
scala = pkgs.scala.override {
jre = pkgs.jre8;
};
};
}
Then I reinstalled scala with nix-env -i scala. Presto!
Update 1: Changed jre = pkgs.openjdk8 to jre = pkgs.jre8.
Update 2: I filed an issue with nixpkgs at https://github.com/NixOS/nixpkgs/issues/22439

Unable to run scala tests in intellij 2016.3.3 and other recent versions

With every recent community edition version of intellij I get this error from the scalatest runner. I'm using the maven plugin and the scala plugin. I'm using scala 11.8 also. I tried these Mac OSX versions of intellij and the corresponding scala plugin(s) that match each respective build:
Environment:
OSX / Mac El Capitan
Intellij Versions I replicated this with:
1. Community Edition 2016.2.5
2. Community Edition 2016.3.3
3. Intellij Community Edition 2017.1 EAP
4. Scalatest version in maven pom.xml: 3.0.1
/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/bin/java -Didea.launcher.port=7532 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Users/Jason/Library/Application Support/IdeaIC2016.2/Scala/lib/scala-plugin-runners.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/lib/tools.jar:/Users/Jason/Sites/smart-hvac/mobiledevice/target/test-classes:/Users/Jason/Sites/smart-hvac/mobiledevice/target/classes:/Users/Jason/.m2/repository/com/typesafe/akka/akka-actor_2.11/2.4.14/akka-actor_2.11-2.4.14.jar:/Users/Jason/.m2/repository/org/scala-lang/scala-library/2.11.8/scala-library-2.11.8.jar:/Users/Jason/.m2/repository/org/scala-lang/modules/scala-java8-compat_2.11/0.7.0/scala-java8-compat_2.11-0.7.0.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-remote_2.11/2.4.14/akka-remote_2.11-2.4.14.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-stream_2.11/2.4.14/akka-stream_2.11-2.4.14.jar:/Users/Jason/.m2/repository/org/reactivestreams/reactive-streams/1.0.0/reactive-streams-1.0.0.jar:/Users/Jason/.m2/repository/com/typesafe/ssl-config-core_2.11/0.2.1/ssl-config-core_2.11-0.2.1.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-protobuf_2.11/2.4.14/akka-protobuf_2.11-2.4.14.jar:/Users/Jason/.m2/repository/io/netty/netty/3.10.6.Final/netty-3.10.6.Final.jar:/Users/Jason/.m2/repository/org/uncommons/maths/uncommons-maths/1.2.2a/uncommons-maths-1.2.2a.jar:/Users/Jason/.m2/repository/io/aeron/aeron-driver/1.0.4/aeron-driver-1.0.4.jar:/Users/Jason/.m2/repository/io/aeron/aeron-client/1.0.4/aeron-client-1.0.4.jar:/Users/Jason/.m2/repository/org/agrona/Agrona/0.9.0/Agrona-0.9.0.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-cluster-sharding_2.11/2.4.14/akka-cluster-sharding_2.11-2.4.14.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-cluster_2.11/2.4.14/akka-cluster_2.11-2.4.14.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-persistence_2.11/2.4.14/akka-persistence_2.11-2.4.14.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-cluster-tools_2.11/2.4.14/akka-cluster-tools_2.11-2.4.14.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-slf4j_2.11/2.4.14/akka-slf4j_2.11-2.4.14.jar:/Users/Jason/.m2/repository/org/slf4j/slf4j-api/1.7.16/slf4j-api-1.7.16.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-stream-kafka_2.11/0.13/akka-stream-kafka_2.11-0.13.jar:/Users/Jason/.m2/repository/org/apache/kafka/kafka-clients/0.10.0.1/kafka-clients-0.10.0.1.jar:/Users/Jason/.m2/repository/net/jpountz/lz4/lz4/1.3.0/lz4-1.3.0.jar:/Users/Jason/.m2/repository/org/xerial/snappy/snappy-java/1.1.2.6/snappy-java-1.1.2.6.jar:/Users/Jason/.m2/repository/com/lightbend/akka/akka-split-brain-resolver_2.11/1.0.0/akka-split-brain-resolver_2.11-1.0.0.jar:/Users/Jason/.m2/repository/com/lightbend/akka/akka-diagnostics_2.11/1.0.0/akka-diagnostics_2.11-1.0.0.jar:/Users/Jason/.m2/repository/com/sclasen/akka-zk-cluster-seed_2.11/0.1.8/akka-zk-cluster-seed_2.11-0.1.8.jar:/Users/Jason/.m2/repository/org/apache/curator/curator-framework/2.11.0/curator-framework-2.11.0.jar:/Users/Jason/.m2/repository/org/apache/curator/curator-client/2.11.0/curator-client-2.11.0.jar:/Users/Jason/.m2/repository/org/apache/curator/curator-recipes/2.11.0/curator-recipes-2.11.0.jar:/Users/Jason/.m2/repository/com/github/dnvriend/akka-persistence-inmemory_2.11/1.3.16/akka-persistence-inmemory_2.11-1.3.16.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-persistence-query-experimental_2.11/2.4.14/akka-persistence-query-experimental_2.11-2.4.14.jar:/Users/Jason/.m2/repository/org/scalaz/scalaz-core_2.11/7.2.7/scalaz-core_2.11-7.2.7.jar:/Users/Jason/.m2/repository/com/datastax/cassandra/cassandra-driver-core/3.1.2/cassandra-driver-core-3.1.2.jar:/Users/Jason/.m2/repository/io/dropwizard/metrics/metrics-core/3.1.2/metrics-core-3.1.2.jar:/Users/Jason/.m2/repository/com/github/jnr/jnr-ffi/2.0.7/jnr-ffi-2.0.7.jar:/Users/Jason/.m2/repository/com/github/jnr/jffi/1.2.10/jffi-1.2.10.jar:/Users/Jason/.m2/repository/com/github/jnr/jffi/1.2.10/jffi-1.2.10-native.jar:/Users/Jason/.m2/repository/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar:/Users/Jason/.m2/repository/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar:/Users/Jason/.m2/repository/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar:/Users/Jason/.m2/repository/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar:/Users/Jason/.m2/repository/org/ow2/asm/asm-util/5.0.3/asm-util-5.0.3.jar:/Users/Jason/.m2/repository/com/github/jnr/jnr-x86asm/1.0.2/jnr-x86asm-1.0.2.jar:/Users/Jason/.m2/repository/com/github/jnr/jnr-posix/3.0.27/jnr-posix-3.0.27.jar:/Users/Jason/.m2/repository/com/github/jnr/jnr-constants/0.9.0/jnr-constants-0.9.0.jar:/Users/Jason/.m2/repository/org/cassandraunit/cassandra-unit/3.1.1.0/cassandra-unit-3.1.1.0.jar:/Users/Jason/.m2/repository/org/apache/cassandra/cassandra-all/3.9/cassandra-all-3.9.jar:/Users/Jason/.m2/repository/com/ning/compress-lzf/0.8.4/compress-lzf-0.8.4.jar:/Users/Jason/.m2/repository/commons-cli/commons-cli/1.1/commons-cli-1.1.jar:/Users/Jason/.m2/repository/commons-codec/commons-codec/1.2/commons-codec-1.2.jar:/Users/Jason/.m2/repository/com/googlecode/concurrentlinkedhashmap/concurrentlinkedhashmap-lru/1.4/concurrentlinkedhashmap-lru-1.4.jar:/Users/Jason/.m2/repository/org/antlr/antlr/3.5.2/antlr-3.5.2.jar:/Users/Jason/.m2/repository/org/antlr/ST4/4.0.8/ST4-4.0.8.jar:/Users/Jason/.m2/repository/org/antlr/antlr-runtime/3.5.2/antlr-runtime-3.5.2.jar:/Users/Jason/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar:/Users/Jason/.m2/repository/org/codehaus/jackson/jackson-core-asl/1.9.2/jackson-core-asl-1.9.2.jar:/Users/Jason/.m2/repository/org/codehaus/jackson/jackson-mapper-asl/1.9.2/jackson-mapper-asl-1.9.2.jar:/Users/Jason/.m2/repository/com/googlecode/json-simple/json-simple/1.1/json-simple-1.1.jar:/Users/Jason/.m2/repository/com/boundary/high-scale-lib/1.0.6/high-scale-lib-1.0.6.jar:/Users/Jason/.m2/repository/org/yaml/snakeyaml/1.11/snakeyaml-1.11.jar:/Users/Jason/.m2/repository/org/mindrot/jbcrypt/0.3m/jbcrypt-0.3m.jar:/Users/Jason/.m2/repository/io/dropwizard/metrics/metrics-jvm/3.1.0/metrics-jvm-3.1.0.jar:/Users/Jason/.m2/repository/com/addthis/metrics/reporter-config3/3.0.0/reporter-config3-3.0.0.jar:/Users/Jason/.m2/repository/com/addthis/metrics/reporter-config-base/3.0.0/reporter-config-base-3.0.0.jar:/Users/Jason/.m2/repository/com/thinkaurelius/thrift/thrift-server/0.3.7/thrift-server-0.3.7.jar:/Users/Jason/.m2/repository/com/lmax/disruptor/3.0.1/disruptor-3.0.1.jar:/Users/Jason/.m2/repository/com/clearspring/analytics/stream/2.5.2/stream-2.5.2.jar:/Users/Jason/.m2/repository/it/unimi/dsi/fastutil/6.5.7/fastutil-6.5.7.jar:/Users/Jason/.m2/repository/org/apache/thrift/libthrift/0.9.2/libthrift-0.9.2.jar:/Users/Jason/.m2/repository/org/apache/cassandra/cassandra-thrift/3.9/cassandra-thrift-3.9.jar:/Users/Jason/.m2/repository/com/carrotsearch/hppc/0.5.4/hppc-0.5.4.jar:/Users/Jason/.m2/repository/de/jflex/jflex/1.6.0/jflex-1.6.0.jar:/Users/Jason/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar:/Users/Jason/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar:/Users/Jason/.m2/repository/net/mintern/primitive/1.0/primitive-1.0.jar:/Users/Jason/.m2/repository/com/github/rholder/snowball-stemmer/1.3.0.581.1/snowball-stemmer-1.3.0.581.1.jar:/Users/Jason/.m2/repository/com/googlecode/concurrent-trees/concurrent-trees/2.4.0/concurrent-trees-2.4.0.jar:/Users/Jason/.m2/repository/net/java/dev/jna/jna/4.0.0/jna-4.0.0.jar:/Users/Jason/.m2/repository/com/github/jbellis/jamm/0.3.0/jamm-0.3.0.jar:/Users/Jason/.m2/repository/org/fusesource/sigar/1.6.4/sigar-1.6.4.jar:/Users/Jason/.m2/repository/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar:/Users/Jason/.m2/repository/org/caffinitas/ohc/ohc-core/0.4.3/ohc-core-0.4.3.jar:/Users/Jason/.m2/repository/com/github/ben-manes/caffeine/caffeine/2.2.6/caffeine-2.2.6.jar:/Users/Jason/.m2/repository/com/google/guava/guava/18.0/guava-18.0.jar:/Users/Jason/.m2/repository/org/apache/commons/commons-lang3/3.4/commons-lang3-3.4.jar:/Users/Jason/.m2/repository/io/netty/netty-handler/4.0.27.Final/netty-handler-4.0.27.Final.jar:/Users/Jason/.m2/repository/io/netty/netty-buffer/4.0.27.Final/netty-buffer-4.0.27.Final.jar:/Users/Jason/.m2/repository/io/netty/netty-common/4.0.27.Final/netty-common-4.0.27.Final.jar:/Users/Jason/.m2/repository/io/netty/netty-transport/4.0.27.Final/netty-transport-4.0.27.Final.jar:/Users/Jason/.m2/repository/io/netty/netty-codec/4.0.27.Final/netty-codec-4.0.27.Final.jar:/Users/Jason/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/Jason/.m2/repository/org/hamcrest/hamcrest-library/1.3/hamcrest-library-1.3.jar:/Users/Jason/.m2/repository/org/aspectj/aspectjrt/1.8.2/aspectjrt-1.8.2.jar:/Users/Jason/.m2/repository/com/vivint/actor-path-log-filter-logback_2.11/0.2.4/actor-path-log-filter-logback_2.11-0.2.4.jar:/Users/Jason/.m2/repository/com/vivint/actor-path-log-filter-core_2.11/0.2.4/actor-path-log-filter-core_2.11-0.2.4.jar:/Users/Jason/Sites/smart-hvac/smart-hvac-kamon/target/classes:/Users/Jason/.m2/repository/com/typesafe/akka/akka-http_2.11/10.0.0/akka-http_2.11-10.0.0.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-http-core_2.11/10.0.0/akka-http-core_2.11-10.0.0.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-parsing_2.11/10.0.0/akka-parsing_2.11-10.0.0.jar:/Users/Jason/.m2/repository/io/kamon/kamon-core_2.11/0.6.3/kamon-core_2.11-0.6.3.jar:/Users/Jason/.m2/repository/org/hdrhistogram/HdrHistogram/2.1.8/HdrHistogram-2.1.8.jar:/Users/Jason/.m2/repository/io/kamon/kamon-statsd_2.11/0.6.3/kamon-statsd_2.11-0.6.3.jar:/Users/Jason/.m2/repository/io/kamon/kamon-system-metrics_2.11/0.6.3/kamon-system-metrics_2.11-0.6.3.jar:/Users/Jason/.m2/repository/io/kamon/sigar-loader/1.6.5-rev002/sigar-loader-1.6.5-rev002.jar:/Users/Jason/.m2/repository/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar:/Users/Jason/.m2/repository/org/json4s/json4s-native_2.11/3.4.0/json4s-native_2.11-3.4.0.jar:/Users/Jason/.m2/repository/org/json4s/json4s-core_2.11/3.4.0/json4s-core_2.11-3.4.0.jar:/Users/Jason/.m2/repository/org/json4s/json4s-ast_2.11/3.4.0/json4s-ast_2.11-3.4.0.jar:/Users/Jason/.m2/repository/org/json4s/json4s-scalap_2.11/3.4.0/json4s-scalap_2.11-3.4.0.jar:/Users/Jason/.m2/repository/org/json4s/json4s-jackson_2.11/3.4.0/json4s-jackson_2.11-3.4.0.jar:/Users/Jason/Sites/smart-hvac/smart-hvac-zookeeper/target/classes:/Users/Jason/Sites/smart-hvac/smart-hvac-kafka/target/classes:/Users/Jason/Sites/smart-hvac/smart-hvac-util/target/classes:/Users/Jason/.m2/repository/com/vivint/analytics/common/analytics-core/1.71.0/analytics-core-1.71.0.jar:/Users/Jason/.m2/repository/com/google/code/gson/gson/2.3.1/gson-2.3.1.jar:/Users/Jason/.m2/repository/org/scribe/scribe/1.3.7/scribe-1.3.7.jar:/Users/Jason/.m2/repository/de/grundid/opendatalab/geojson-jackson/1.5.1/geojson-jackson-1.5.1.jar:/Users/Jason/.m2/repository/com/vivint/analytics/common/platform-model/1.71.0/platform-model-1.71.0.jar:/Users/Jason/.m2/repository/com/vivint/analytics/occupancy/occupancy-core/1.1.8/occupancy-core-1.1.8.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-distributed-data-experimental_2.11/2.4.14/akka-distributed-data-experimental_2.11-2.4.14.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-http-jackson_2.11/10.0.0/akka-http-jackson_2.11-10.0.0.jar:/Users/Jason/.m2/repository/com/lightbend/cinnamon/cinnamon-chmetrics_2.11/2.1.3/cinnamon-chmetrics_2.11-2.1.3.jar:/Users/Jason/.m2/repository/com/lightbend/cinnamon/cinnamon-core_2.11/2.1.3/cinnamon-core_2.11-2.1.3.jar:/Users/Jason/.m2/repository/com/lightbend/cinnamon/cinnamon-logging/2.1.3/cinnamon-logging-2.1.3.jar:/Users/Jason/.m2/repository/com/lightbend/cinnamon/cinnamon-akka_2.11/2.1.3/cinnamon-akka_2.11-2.1.3.jar:/Users/Jason/.m2/repository/com/lightbend/cinnamon/cinnamon-chmetrics-statsd-reporter_2.11/2.1.3/cinnamon-chmetrics-statsd-reporter_2.11-2.1.3.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-persistence-cassandra_2.11/0.22/akka-persistence-cassandra_2.11-0.22.jar:/Users/Jason/.m2/repository/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.6.5/jackson-datatype-jsr310-2.6.5.jar:/Users/Jason/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.6.5/jackson-core-2.6.5.jar:/Users/Jason/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.6.5/jackson-databind-2.6.5.jar:/Users/Jason/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.6.0/jackson-annotations-2.6.0.jar:/Users/Jason/.m2/repository/com/rosaloves/bitlyj/2.0.0/bitlyj-2.0.0.jar:/Users/Jason/.m2/repository/org/apache/avro/avro/1.7.7/avro-1.7.7.jar:/Users/Jason/.m2/repository/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar:/Users/Jason/.m2/repository/org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar:/Users/Jason/.m2/repository/org/tukaani/xz/1.0/xz-1.0.jar:/Users/Jason/.m2/repository/net/sourceforge/jeval/jeval/0.9.4/jeval-0.9.4.jar:/Users/Jason/.m2/repository/com/google/api-client/google-api-client/1.18.0-rc/google-api-client-1.18.0-rc.jar:/Users/Jason/.m2/repository/com/google/oauth-client/google-oauth-client/1.18.0-rc/google-oauth-client-1.18.0-rc.jar:/Users/Jason/.m2/repository/com/google/http-client/google-http-client/1.18.0-rc/google-http-client-1.18.0-rc.jar:/Users/Jason/.m2/repository/org/apache/httpcomponents/httpclient/4.0.1/httpclient-4.0.1.jar:/Users/Jason/.m2/repository/org/apache/httpcomponents/httpcore/4.0.1/httpcore-4.0.1.jar:/Users/Jason/.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar:/Users/Jason/.m2/repository/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.jar:/Users/Jason/Sites/smart-hvac/messages/target/classes:/Users/Jason/.m2/repository/com/outworkers/phantom-dsl_2.11/2.0.1/phantom-dsl_2.11-2.0.1.jar:/Users/Jason/.m2/repository/com/outworkers/phantom-connectors_2.11/2.0.1/phantom-connectors_2.11-2.0.1.jar:/Users/Jason/.m2/repository/org/slf4j/log4j-over-slf4j/1.7.21/log4j-over-slf4j-1.7.21.jar:/Users/Jason/.m2/repository/org/typelevel/macro-compat_2.11/1.1.1/macro-compat_2.11-1.1.1.jar:/Users/Jason/.m2/repository/com/outworkers/diesel-engine_2.11/0.5.0/diesel-engine_2.11-0.5.0.jar:/Users/Jason/.m2/repository/com/chuusai/shapeless_2.11/2.3.2/shapeless_2.11-2.3.2.jar:/Users/Jason/.m2/repository/joda-time/joda-time/2.9.4/joda-time-2.9.4.jar:/Users/Jason/.m2/repository/org/joda/joda-convert/1.8.1/joda-convert-1.8.1.jar:/Users/Jason/.m2/repository/com/datastax/cassandra/cassandra-driver-extras/3.1.0/cassandra-driver-extras-3.1.0.jar:/Users/Jason/Sites/smart-hvac/smart-hvac-util/target/test-classes:/Users/Jason/.m2/repository/com/typesafe/akka/akka-testkit_2.11/2.4.14/akka-testkit_2.11-2.4.14.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-http-testkit_2.11/10.0.0/akka-http-testkit_2.11-10.0.0.jar:/Users/Jason/.m2/repository/com/typesafe/akka/akka-stream-testkit_2.11/2.4.14/akka-stream-testkit_2.11-2.4.14.jar:/Users/Jason/.m2/repository/ch/qos/logback/logback-classic/1.1.7/logback-classic-1.1.7.jar:/Users/Jason/.m2/repository/ch/qos/logback/logback-core/1.1.7/logback-core-1.1.7.jar:/Users/Jason/.m2/repository/net/logstash/logback/logstash-logback-encoder/4.7/logstash-logback-encoder-4.7.jar:/Users/Jason/.m2/repository/com/teambytes/logback/logback-flume-appender_2.11/0.0.9/logback-flume-appender_2.11-0.0.9.jar:/Users/Jason/.m2/repository/org/apache/flume/flume-ng-sdk/1.5.0.1/flume-ng-sdk-1.5.0.1.jar:/Users/Jason/.m2/repository/org/apache/avro/avro-ipc/1.7.3/avro-ipc-1.7.3.jar:/Users/Jason/.m2/repository/org/mortbay/jetty/jetty/6.1.26/jetty-6.1.26.jar:/Users/Jason/.m2/repository/org/mortbay/jetty/jetty-util/6.1.26/jetty-util-6.1.26.jar:/Users/Jason/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar:/Users/Jason/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar:/Users/Jason/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar:/Users/Jason/.m2/repository/junit/junit/4.11/junit-4.11.jar:/Users/Jason/.m2/repository/org/scalatest/scalatest_2.11/3.0.0-M15/scalatest_2.11-3.0.0-M15.jar:/Users/Jason/.m2/repository/org/scalactic/scalactic_2.11/3.0.0-M15/scalactic_2.11-3.0.0-M15.jar:/Users/Jason/.m2/repository/org/scala-lang/scala-reflect/2.11.7/scala-reflect-2.11.7.jar:/Users/Jason/.m2/repository/org/scala-lang/modules/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar:/Users/Jason/.m2/repository/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.4/scala-parser-combinators_2.11-1.0.4.jar:/Users/Jason/.m2/repository/net/manub/scalatest-embedded-kafka_2.11/0.8.0/scalatest-embedded-kafka_2.11-0.8.0.jar:/Users/Jason/.m2/repository/org/apache/kafka/kafka_2.11/0.10.0.1/kafka_2.11-0.10.0.1.jar:/Users/Jason/.m2/repository/com/101tec/zkclient/0.8/zkclient-0.8.jar:/Users/Jason/.m2/repository/com/yammer/metrics/metrics-core/2.2.0/metrics-core-2.2.0.jar:/Users/Jason/.m2/repository/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar:/Users/Jason/.m2/repository/org/apache/zookeeper/zookeeper/3.4.7/zookeeper-3.4.7.jar:/Users/Jason/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/Users/Jason/.m2/repository/jline/jline/0.9.94/jline-0.9.94.jar:/Users/Jason/.m2/repository/org/threeten/threeten-extra/0.9/threeten-extra-0.9.jar:/Users/Jason/.m2/repository/com/typesafe/config/1.3.0/config-1.3.0.jar:/Users/Jason/.m2/repository/com/twitter/chill_2.11/0.8.0/chill_2.11-0.8.0.jar:/Users/Jason/.m2/repository/com/esotericsoftware/kryo-shaded/3.0.3/kryo-shaded-3.0.3.jar:/Users/Jason/.m2/repository/com/esotericsoftware/minlog/1.3.0/minlog-1.3.0.jar:/Users/Jason/.m2/repository/org/objenesis/objenesis/2.1/objenesis-2.1.jar:/Users/Jason/.m2/repository/com/twitter/chill-java/0.8.0/chill-java-0.8.0.jar:/Users/Jason/.m2/repository/com/twitter/chill-akka_2.11/0.8.0/chill-akka_2.11-0.8.0.jar:/Users/Jason/.m2/repository/de/javakaffee/kryo-serializers/0.38/kryo-serializers-0.38.jar:/Users/Jason/.m2/repository/com/esotericsoftware/kryo/3.0.3/kryo-3.0.3.jar:/Users/Jason/.m2/repository/com/esotericsoftware/reflectasm/1.10.1/reflectasm-1.10.1.jar:/Users/Jason/.m2/repository/com/google/protobuf/protobuf-java/2.6.1/protobuf-java-2.6.1.jar:/Applications/IntelliJ IDEA CE.app/Contents/lib/idea_rt.jar" com.intellij.rt.execution.application.AppMain org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner -s com.vivint.smarthvac.actor.geo.GeoDeviceActorSpec -testName "GeoDeviceActor should receive home locations from cassandra for multiple panels" -showProgressMessages true -C org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestReporter
Testing started at 6:17 PM ...
java.lang.IllegalArgumentException: ERROR: -r has been deprecated for a very long time and is no longer supported, to prepare for reusing it for a different purpose in the near future. Please change all uses of -r to -C.
at org.scalatest.tools.ArgsParser$.checkArgsForValidity(ArgsParser.scala:41)
at org.scalatest.tools.Runner$.runOptionallyWithPassFailReporter(Runner.scala:857)
at org.scalatest.tools.Runner$.run(Runner.scala:850)
at org.scalatest.tools.Runner.run(Runner.scala)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.runScalaTest2(ScalaTestRunner.java:138)
at org.jetbrains.plugins.scala.testingSupport.scalaTest.ScalaTestRunner.main(ScalaTestRunner.java:28)
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)
Process finished with exit code 0
I have attempted to fix this; here's steps I have already taken:
1. uninstall / reinstall intellij
2. brew upgrade sbt
3. various versions of intellij and this plugin
4. I was on the 3.0.0-M15 build of scalatest; I upgraded to 3.0.1
Nothing I have tried so far works... I have seen other people post similar issues & they said that upgrading scalatest fixed this; the only upgrade I'm aware of would be to move to a snapshot version of scalatest...
It turned out the issue was that in a subproject, one of our teammates imported org.scalatest in the maven pom.xml and didn't set the scope to test... Aside from the crazy dependency conflicts this created, it was somehow overriding my version of scalatest. By setting the scope of scalatest to "test" in the subproject, this issue was fixed. i.e. Adding <scope>test</scope> fixed things; see the example below.
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_${scala.majorVersion}</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>