snowplow-archive / kinesis-example-scala-consumer

Example Scala/SBT event consumer for Amazon Kinesis
http://snowplowanalytics.com
22 stars 14 forks source link

Fails to build from source. #12

Open aragnon opened 8 years ago

aragnon commented 8 years ago

This is a JDK7 vs JDK8 issue, which is something your build system should point out and it would be better if it would work with both, although I can imagine that new development would only be done on JDK8+.

sbt compile                                                                                                                   
[info] Loading project definition from /Users/arag/src/snowplow/kinesis-example-scala-consumer/project
[info] Set current project to kinesis-example-scala-consumer (in build file:/Users/arag/src/snowplow/kinesis-example-scala-consumer/)
[info] Compiling schema with command: thrift -gen java:hashcode -o /Users/arag/src/snowplow/kinesis-example-scala-consumer/target/scala-2.10/src_managed/main /Users/arag/src/snowplow/kinesis-example-scala-consumer/src/main/thrift/thrift_data.thrift
[info] Compiling 4 Scala sources and 1 Java source to /Users/arag/src/snowplow/kinesis-example-scala-consumer/target/scala-2.10/classes...
[info] 'compiler-interface' not yet compiled for Scala 2.10.1. Compiling...
error: error while loading CharSequence, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar(java/lang/CharSequence.class)' is broken
(class java.lang.RuntimeException/bad constant pool tag 18 at byte 10)
error: error while loading Comparator, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar(java/util/Comparator.class)' is broken
(class java.lang.RuntimeException/bad constant pool tag 18 at byte 20)
error: error while loading AnnotatedElement, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar(java/lang/reflect/AnnotatedElement.class)' is broken
(class java.lang.RuntimeException/bad constant pool tag 18 at byte 76)
error: error while loading Arrays, class file '/Library/Java/JavaVirtualMachines/jdk1.8.0_65.jdk/Contents/Home/jre/lib/rt.jar(java/util/Arrays.class)' is broken
(class java.lang.RuntimeException/bad constant pool tag 18 at byte 765)
/var/folders/g5/vwqh3f854dz660v7zzn0s0680000gn/T/sbt_99057e2a/xsbt/ExtractAPI.scala:395: error: java.util.Comparator does not take type parameters
        private[this] val sortClasses = new Comparator[Symbol] {
                                            ^
5 errors found
[error] (compile:compile) Error compiling sbt component 'compiler-interface'
[error] Total time: 4 s, completed Feb 29, 2016
aragnon commented 8 years ago

Just modifying the Scala version to 2.11.7 still results in the following:

[error] (*:update) sbt.ResolveException: unresolved dependency: org.clapper#argot_2.11;1.0.1: not found
[error] unresolved dependency: io.github.cloudify#scalazon_2.11;0.5: not found
[error] unresolved dependency: org.specs2#specs2_2.11;2.3.4: not found