You are using a version of the library that was compiled for a different version of Scala than the version of Spark that you are using. Make sure that they match up.
On Mon, Apr 25, 2016 at 5:19 PM, Mohamed ismail <mismai...@yahoo.com.invalid > wrote: > here is an example with code. > http://stackoverflow.com/questions/33078221/xml-processing-in-spark > > I haven't tried. > > > On Monday, April 25, 2016 1:06 PM, Jinan Alhajjaj < > j.r.alhaj...@hotmail.com> wrote: > > > Hi All, > I am trying to use XML data source that is used for parsing and querying > XML data with Apache Spark, for Spark SQL and data frames.I am using Apache > spark version 1.6.1 and I am using Java as a programming language. > I wrote this sample code : > SparkConf conf = new SparkConf().setAppName("parsing").setMaster("local"); > > JavaSparkContext sc = new JavaSparkContext(conf); > > SQLContext sqlContext = new SQLContext(sc); > > DataFrame df = > sqlContext.read().format("com.databricks.spark.xml").option("rowtag", > "page").load("file.xml"); > > When I run this code I faced a problem which is > Exception in thread "main" java.lang.NoSuchMethodError: > scala.Predef$.$conforms()Lscala/Predef$$less$colon$less; > at com.databricks.spark.xml.XmlOptions.<init>(XmlOptions.scala:26) > at com.databricks.spark.xml.XmlOptions$.apply(XmlOptions.scala:48) > at > com.databricks.spark.xml.DefaultSource.createRelation(DefaultSource.scala:58) > at > com.databricks.spark.xml.DefaultSource.createRelation(DefaultSource.scala:44) > at > org.apache.spark.sql.execution.datasources.ResolvedDataSource$.apply(ResolvedDataSource.scala:158) > at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:119) > at org.apache.spark.sql.DataFrameReader.load(DataFrameReader.scala:109) > at datbricxml.parsing.main(parsing.java:16). > Please, I need to solve this error for my senior project ASAP. > > > >