Hi sathyanarayanan
zero() on scala.runtime.VolatileObjectRef has been introduced in Scala 2.11 You probably have a library compiled against Scala 2.11 and running on a Scala 2.10 runtime. See v2.10: https://github.com/scala/scala/blob/2.10.x/src/library/scala/runtime/VolatileObjectRef.java v2.11: https://github.com/scala/scala/blob/2.11.x/src/library/scala/runtime/VolatileObjectRef.java Regards Sam On Sat, 4 Feb 2017 at 09:24, sathyanarayanan mudhaliyar < sathyanarayananmudhali...@gmail.com> wrote: > 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. > >