you will need to change sbt version to 13.2. I think spark 0.9.1 was released with sbt 13 ? Incase not then it may not work with java 8. Just wait for 1.0 release or give 1.0 release candidate a try !
http://mail-archives.apache.org/mod_mbox/spark-dev/201404.mbox/%3CCABPQxstL6nwTO2H9p8%3DGJh1g2zxOJd02Wt7L06mCLjo-vwwG9Q%40mail.gmail.com%3E Prashant Sharma On Fri, May 2, 2014 at 3:56 PM, N.Venkata Naga Ravi <nvn_r...@hotmail.com>wrote: > > Hi, > > > I am tyring to build Apache Spark with Java 8 in my Mac system ( OS X > 10.8.5) , but getting following exception. > Please help on resolving it. > > > dhcp-173-39-68-28:spark-0.9.1 neravi$ java -version > java version "1.8.0" > Java(TM) SE Runtime Environment (build 1.8.0-b132) > Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode) > dhcp-173-39-68-28:spark-0.9.1 neravi$ ./sbt/sbt assembly > Launching sbt from sbt/sbt-launch-0.12.4.jar > Java HotSpot(TM) 64-Bit Server VM warning: ignoring option > MaxPermSize=350m; support was removed in 8.0 > [info] Loading project definition from > /Applications/spark-0.9.1/project/project > > *[info] Compiling 1 Scala source to > /Applications/spark-0.9.1/project/project/target/scala-2.9.2/sbt-0.12/classes... > [error] error while loading CharSequence, class file > '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/lang/CharSequence.class)' > is broken* > [error] (bad constant pool tag 18 at byte 10) > [error] error while loading Comparator, class file > '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/util/Comparator.class)' > is broken > [error] (bad constant pool tag 18 at byte 20) > [error] two errors found > [error] (compile:compile) Compilation failed > Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? r > [info] Loading project definition from > /Applications/spark-0.9.1/project/project > [info] Compiling 1 Scala source to > /Applications/spark-0.9.1/project/project/target/scala-2.9.2/sbt-0.12/classes... > [error] error while loading CharSequence, class file > '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/lang/CharSequence.class)' > is broken > [error] (bad constant pool tag 18 at byte 10) > [error] error while loading Comparator, class file > '/Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre/lib/rt.jar(java/util/Comparator.class)' > is broken > [error] (bad constant pool tag 18 at byte 20) > [error] two errors found > [error] (compile:compile) Compilation failed > Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? q > > > Thanks, > Ravi >