spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sathyanarayanan mudhaliyar <sathyanarayananmudhali...@gmail.com>
Subject java.lang.NoSuchMethodError: scala.runtime.ObjectRef.zero()Lscala/runtime/ObjectRef
Date Sat, 04 Feb 2017 09:24:37 GMT
Hi ,
I got the error below when executed

Exception in thread "main" java.lang.NoSuchMethodError:
scala.runtime.ObjectRef.zero()Lscala/runtime/ObjectRef;

error in detail:

Exception in thread "main" java.lang.NoSuchMethodError:
scala.runtime.ObjectRef.zero()Lscala/runtime/ObjectRef;
    at
com.datastax.spark.connector.cql.CassandraConnector$.com$datastax$spark$connector$cql$CassandraConnector$$createSession(CassandraConnector.scala)
    at
com.datastax.spark.connector.cql.CassandraConnector$$anonfun$3.apply(CassandraConnector.scala:149)
    at
com.datastax.spark.connector.cql.CassandraConnector$$anonfun$3.apply(CassandraConnector.scala:149)
    at
com.datastax.spark.connector.cql.RefCountedCache.createNewValueAndKeys(RefCountedCache.scala:31)
    at
com.datastax.spark.connector.cql.RefCountedCache.acquire(RefCountedCache.scala:56)
    at
com.datastax.spark.connector.cql.CassandraConnector.openSession(CassandraConnector.scala:82)
    at com.nwf.Consumer.main(Consumer.java:63)

code :

    Consumer consumer = new Consumer();
    SparkConf conf = new
SparkConf().setAppName("kafka-sandbox").setMaster("local[2]");
    conf.set("spark.cassandra.connection.host", "localhost"); //connection
for cassandra database
    JavaSparkContext sc = new JavaSparkContext(conf);
    CassandraConnector connector = CassandraConnector.apply(sc.getConf());
    final Session session = connector.openSession();
    final PreparedStatement prepared = session.prepare("INSERT INTO
spark_test5.messages JSON?");


The error is in the line which is in green color.
Thank you guys.

Mime
View raw message