You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@zeppelin.apache.org by afancy <gr...@gmail.com> on 2016/10/26 12:19:56 UTC

Spark Streaming error in zeppelin paragraph: java.lang.NoClassDefFoundError:

Dear all,

I pull  zeppelin from github, and  build. I run the following Spark
streaming code in a paragraph, but got the NoClassDefFoundError. Could
anybody help? thanks!

import org.apache.spark._
import org.apache.spark.streaming._
import org.apache.spark.streaming.StreamingContext._


case class Loc(lat: Double, lon: Double)
case class message(info: String, loc: Loc)

val ssc = new StreamingContext(sc, Seconds(5))
val input = ssc.socketTextStream("localhost", 12397)


input.foreachRDD(rdd => {
    val df = rdd.map(s => message(
                          s.info,
                          Loc(s.lat, s.lon)
                      )
                    )

    var items = df.collect
    z.angularBind("locations", items)
})

ssc.start()


import org.apache.spark._
import org.apache.spark.streaming._
import org.apache.spark.streaming.StreamingContext._
defined class Loc
defined class message
ssc: org.apache.spark.streaming.StreamingContext =
org.apache.spark.streaming.StreamingContext@657c0ac3
java.lang.NoClassDefFoundError: Could not initialize class
org.apache.spark.rdd.RDDOperationScope$
at
org.apache.spark.streaming.StreamingContext.withNamedScope(StreamingContext.scala:273)
at
org.apache.spark.streaming.StreamingContext.socketTextStream(StreamingContext.scala:301)
... 100 elided

Re: Spark Streaming error in zeppelin paragraph: java.lang.NoClassDefFoundError:

Posted by Park Hoon <1a...@gmail.com>.
Hi afancy!


Could you describe build options used to build zeppelin? I am not sure but
it might be due to the build options.


Thanks!

On Wed, Oct 26, 2016 at 9:19 PM, afancy <gr...@gmail.com> wrote:

> Dear all,
>
> I pull  zeppelin from github, and  build. I run the following Spark
> streaming code in a paragraph, but got the NoClassDefFoundError. Could
> anybody help? thanks!
>
> import org.apache.spark._
> import org.apache.spark.streaming._
> import org.apache.spark.streaming.StreamingContext._
>
>
> case class Loc(lat: Double, lon: Double)
> case class message(info: String, loc: Loc)
>
> val ssc = new StreamingContext(sc, Seconds(5))
> val input = ssc.socketTextStream("localhost", 12397)
>
>
> input.foreachRDD(rdd => {
>     val df = rdd.map(s => message(
>                           s.info,
>                           Loc(s.lat, s.lon)
>                       )
>                     )
>
>     var items = df.collect
>     z.angularBind("locations", items)
> })
>
> ssc.start()
>
>
> import org.apache.spark._
> import org.apache.spark.streaming._
> import org.apache.spark.streaming.StreamingContext._
> defined class Loc
> defined class message
> ssc: org.apache.spark.streaming.StreamingContext =
> org.apache.spark.streaming.StreamingContext@657c0ac3
> java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.spark.rdd.RDDOperationScope$
> at org.apache.spark.streaming.StreamingContext.withNamedScope(
> StreamingContext.scala:273)
> at org.apache.spark.streaming.StreamingContext.socketTextStream(
> StreamingContext.scala:301)
> ... 100 elided
>
>