Zeppelin : Error while running notebook
<p>I am providing my jar as dependency to spark interpreter of Zeppelin. While running notebook containing service call of above mentioned jar the notebook remains in error state. Zeppelin log shows following exception:</p>

<pre><code>Caused by: java.lang.NoClassDefFoundError: scala/reflect/internal/AnnotationInfos$ErroneousAnnotation$
    at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.newTyper(ReplGlobal.scala:34)
    at scala.tools.nsc.typechecker.Namers$Namer.&lt;init&gt;(Namers.scala:58)
    at scala.tools.nsc.typechecker.Namers$NormalNamer.&lt;init&gt;(Namers.scala:50)
    at scala.tools.nsc.typechecker.Namers$class.newNamer(Namers.scala:51)
    at scala.tools.nsc.interpreter.ReplGlobal$$anon$1.newNamer(ReplGlobal.scala:23)
    at scala.tools.nsc.typechecker.Analyzer$namerFactory$$anon$1.apply(Analyzer.scala:43)
    at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:430)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:397)
    at scala.tools.nsc.Global$GlobalPhase$$anonfun$run$1.apply(Global.scala:397)
    at scala.collection.Iterator$class.foreach(Iterator.scala:893)
    at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
    at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:397)
    at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1625)
    at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1610)
    at scala.tools.nsc.Global$Run.compileSources(Global.scala:1605)
    at scala.tools.nsc.interpreter.IMain.compileSourcesKeepingRun(IMain.scala:388)
    at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compileAndSaveRun(IMain.scala:804)
    at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.compile(IMain.scala:763)
    at scala.tools.nsc.interpreter.IMain$Request.compile$lzycompute(IMain.scala:939)
    at scala.tools.nsc.interpreter.IMain$Request.compile(IMain.scala:934)
    at scala.tools.nsc.interpreter.IMain.compile(IMain.scala:531)
    at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:519)
    at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:517)
    ... 18 more
</code></pre>

<p>Just to give brief idea about the jar, it is basically reading and writing to Kafka using Spark streaming.  </p>

<p>The code is written in Scala, and I am building a Fat-jar using Gradle. 
Strangely when I build jar using SBT and it works fine (used assembly plugin).
Here is my Gradle file:</p>

<pre><code>plugins {
    id "com.github.johnrengelman.shadow" version "1.2.3"
}
group 'com.demo'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'scala'
sourceCompatibility = 1.8

configurations { providedCompile }

repositories {
    mavenLocal()
    mavenCentral()
}

dependencies {
    providedCompile group: 'org.apache.spark', name: 'spark-core_2.11', version: '2.0.0'
    providedCompile group: 'org.apache.spark', name: 'spark-sql_2.11', version: '2.0.0'
    compile group: 'org.apache.spark', name: 'spark-streaming_2.11', version: '2.0.0'
    compile group: 'org.apache.spark', name: 'spark-streaming-kafka_2.11', version: '1.6.2'
    compile group: 'org.apache.spark', name: 'spark-catalyst_2.11', version: '2.0.0'
    compile group: 'org.apache.kafka', name: 'kafka_2.11', version: '0.9.0.1'
    compile group: 'org.apache.kafka', name: 'kafka-clients', version: '0.9.0.1'
    testCompile group: 'junit', name: 'junit', version: '4.11'
}



shadowJar {
    zip64 true
}

build.dependsOn(shadowJar);

sourceSets.main.compileClasspath += configurations.providedCompile
sourceSets.test.compileClasspath += configurations.providedCompile
sourceSets.test.runtimeClasspath += configurations.providedCompile
</code></pre>