I'm trying to upgrade my mongodb plugin from 2.0.1 to 3.0.3. However I keep getting the following error:
java.lang.NoClassDefFoundError: com/mongodb/AggregationOptions
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
at java.lang.Class.getDeclaredMethods(Class.java:1855)
at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:343)
at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:293)
at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3048)
at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:483)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(Cl
...
I've tried changing the version of the plugin to 3.0.2 but the error persists.
UPDATE:
I'm on Grails 2.3.11.
I've tried including the plugin with specifying no dependencies and also copy pasting the dependencies from my past configuration which is:
dependencies {
runtime "org.mongodb:mongo-java-driver:2.11.4"
compile "org.mongodb:mongo-java-driver:2.11.4"
runtime "com.gmongo:gmongo:1.2"
}
and
plugins {
...
compile(':mongodb:2.0.1') {
excludes 'mongo-java-driver', 'gmongo'
}
Update your BuildConfig a bit:
compile ":mongodb:3.0.2"
Don't specify any other mongo related dependencies and don't exclude mongo-java-driver or gmongo. Also, if you are using mongeez plugin then you have to exclude the java driver.
compile (":mongeez:0.2.3") {
excludes("mongo-java-driver")
}
changing dependencies to:
runtime "org.mongodb:mongo-java-driver:2.12.3"
compile "org.mongodb:mongo-java-driver:2.12.3"
works
Related
I have a Kotlin based Gradle project, where I'm using Scala. All my dependencies are coming from the internal repository, so I cannot use any Scala version, but only the ones available.
Because of that I have the following list of dependencies:
plugins {
java
}
//...
apply(plugin = "scala")
//...
dependencies {
implementation("org.scala-lang.scala-reflect:2.12.5")
compileOnly("org.scala-lang.scala-library:2.12.9") {
exclude("org.scala-lang.scala-reflect")
}
On paper it should work - I defined dependencies available on internal nexus.
However, when I try to build the project, I'm getting the following error:
Execution failed for task ':compileScala'.
> Could not resolve all files for configuration ':zinc'.
> Could not find scala-reflect-2.12.10.jar (org.scala-lang.scala-reflect:2.10.10).
> Searched in the following locations:
<nexus_url>
Is it because of scala plugin?
UPDATE
I have checked that the error occurs, because the version of Zinc I have is built on top of Scala 2.12.10. And since the version is not available on the nexus, it cannot be ran.
Is there a way to change the Scala version Zinc is using?
After searching through Gradle Scala plugin documentation (https://docs.gradle.org/current/userguide/scala_plugin.html#sec:configure_zinc_compiler)
I have found the solution.
What I had to do was changing the Zinc version:
scala {
zincVersion.set("1.3.1")
}
I'm new to JavaFX and TornadoFX but know Kotlin.
I am working on new desktop application and was trying TornadoFX.
I installed TornadoFX plugin in IntelliJ and create a new TornadoFX project (gradle based).
With the template code, when I run the app I get the following error :
Jan 28, 2020 4:06:22 PM tornadofx.DefaultErrorHandler uncaughtException
SEVERE: Uncaught error
java.lang.reflect.InvocationTargetException
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:483)
at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
Caused by: java.lang.RuntimeException: Exception in Application start method
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$147(LauncherImpl.java:157)
at com.sun.javafx.application.LauncherImpl$$Lambda$49/458209687.run(Unknown Source)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodError: javafx.stage.Window.getProperties()Ljavafx/collections/ObservableMap;
at tornadofx.FXKt.setAboutToBeShown(FX.kt:663)
at tornadofx.App.start(App.kt:84)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$153(LauncherImpl.java:821)
at com.sun.javafx.application.LauncherImpl$$Lambda$52/707342127.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$166(PlatformImpl.java:323)
at com.sun.javafx.application.PlatformImpl$$Lambda$46/1637506559.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$164(PlatformImpl.java:292)
at com.sun.javafx.application.PlatformImpl$$Lambda$48/1602612637.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$165(PlatformImpl.java:291)
at com.sun.javafx.application.PlatformImpl$$Lambda$47/2117255219.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
MyApp Class:
class MyApp: App(MainView::class, Styles::class)
Styles Class:
class Styles : Stylesheet() {
companion object {
val heading by cssclass()
}
init {
label and heading {
padding = box(10.px)
fontSize = 20.px
fontWeight = FontWeight.BOLD
}
}
}
MainView Class:
class MainView : View("Hello TornadoFX") {
override val root = hbox {
label(title) {
addClass(Styles.heading)
}
}
}
I'm using java 1.8, kotlin 1.3 and tornadofx 1.7.17
I also tried by creating a new "Application" configuration to run the app.
Any help is appreciated.
The gradle configuration produced by the TornadoFX plugin is obsolete and has a number of problems. Not only because of the older versions selected for kotlin and tornadofx, but also the buildscript method has been deprecated for kotlin applications that use gradle. Additionaly, the gradle version is quite old and must be updated to work with newer Java versions.
To get a running build starting with the demo app created by the TornadoFX wizard and Java 8 do the following:
Make sure you have a Java 8 JDK that includes JavaFX. Most open JDKs such as Adopt OpenJDK do not. The oracle JDK 8 should include Java FX. For open JDKs, I suggest Zulu or Liberica (they have a build for raspery pi). When you download, make sure to select the JDK with Java FX included. For Zulu, you have to select "JDK FX", for Liberica you have to select "Full JDK".
Edit gradle/wrapper/gradle-wrapper.properties and change the gradle-4.4-bin.zip in the URL to gradle-6.3-bin.zip Version 6.3 will work with JDK up to version 14.
If on Mac or Linux, you have to convert the gradlew script to use unix line endings. The one produced by the TornadoFX plugin uses windows new lines "\r\n" which the "sh" interpreter can't handle. On linux, you can use dos2unix command or sed if you don't have dos2unix installed:sed -i 's/\x0D$//' gradlew
Edit build.gradle using the code below. This is the simplest config to build and run the demo app
Execute the gradlew script to build and run
Mac/Linux: ./gradlew run
Windows: gradlew.bat run
It's a good idea to update the wrapper
Mac/Linux: ./gradlew wrapper
Windows: gradlew.bat wrapper
JDK 8 build.gradle
plugins {
// Apply the Kotlin JVM plugin to add support for Kotlin.
id 'org.jetbrains.kotlin.jvm' version '1.3.70'
// Apply the application plugin to add support for building a CLI application.
id 'application'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
repositories {
mavenLocal()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
// Align versions of all Kotlin components
implementation platform('org.jetbrains.kotlin:kotlin-bom')
// Use the Kotlin JDK 8 standard library.
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
// Use the tornadofx
implementation "no.tornado:tornadofx:1.7.20"
}
mainClassName = "com.example.demo.app.MyApp"
JDK 9+
For JDK 9+, start at step 2 above plus modify the build.gradle to download JavaFX since it was separated from the JDK starting with 9.
Add to the plugins section:
// Apply the javafx plugin
id 'org.openjfx.javafxplugin' version '0.0.8'
And then add a javafx section:
javafx {
version = "13"
modules = [ 'javafx.controls', 'javafx.fxml' ]
}
Finally, change tornadofx version to the 2.0 snapshot
// Use the tornadofx
implementation "no.tornado:tornadofx:2.0.0-SNAPSHOT"
At this point the demo app should run. There are some gotchas with running a JDK 9+ version with TornadoFX but you should be able to find those answers in other questions.
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>
In Eclipse Juno when I try to run Groovy source (that has a main method inside of it) I get:
Caught: java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.3.4 and you are trying to load version 2.3.3
Google, surprisingly, turned up nothing. When I go to Project >> Properties >> Groovy Compiler I see that my Groovy compiler is at 2.3, but it doesn't give me the option to select 2.3.3 or 2.3.4.
Any ideas what the fix is?
There is no fix for that. Each groovy-eclipse compiler is a version tweaked to work with eclipse JDT and whatnot. You can try to use other groovy-eclipse versions, which might feature the groovy version you need
I am using the newest version (2.8.0) of the Eclipse-Groovy plugin that ships with groovy-all-2.1.5.jar. I added Guice to my Groovy project, and when I go to run them from inside Eclipse I get the following error in the console output:
Caught: java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling
java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/typehandling/ShortTypeHandling
at net.me.myapp.utils.restclient.RestClient.<init>(RestClient.groovy:57)
at net.me.myapp.inject.UserServiceClientModule.configure(UserServiceClientModule.groovy:34)
at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
at com.google.inject.spi.Elements.getElements(Elements.java:101)
at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:133)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
at com.google.inject.Guice.createInjector(Guice.java:95)
at com.google.inject.Guice.createInjector(Guice.java:72)
at com.google.inject.Guice.createInjector(Guice.java:62)
at net.me.myapp.UserServiceClient.<init>(UserServiceClient.groovy:37)
at net.me.myapp.UserServiceClient.main(UserServiceClient.groovy:45)
Caused by: java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.typehandling.ShortTypeHandling
... 12 more
According to this answer it's because ShortTypeHandling wasn't added until 2.3.x. So I would now like to attach groovy-all-2.3.3.jar to my Eclipse project's classpath.
The problem is that I don't seem to have edit permissions to change what library the Groovy Libraries library uses under the hood. And when I manually add the 2.3.3 JAR to my build path, I get the following error:
Caught: java.lang.ExceptionInInitializerError
java.lang.ExceptionInInitializerError
Caused by: groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.1.5 and you are trying to load version 2.3.3
What are my options?
Groovy-eclipse versions have its own compilers and are "locked" to them. You may change the versions to whatever is listed under Window > Preferences > Groovy > Compilers, but, AFAIK, you can't change to an arbitrary version of the compiler by simply changing the groovy-all jar in the guts of the plugin dir.
You can install new compiler versions using the update site or eclipse marketplace
Update: install additional compiler versions through Help > Install new Software, select Groovy update site and expand the Extra Groovy Compilers session:
Note i'm using snapshot update site, because i like to live dangerously.