Hi Victor, Instead of importing sqlContext.createSchemaRDD, can you explicitly call sqlContext.createSchemaRDD(rdd) to create a SchemaRDD?
For example, You have a case class Record. case class Record(data_date: String, mobile: String, create_time: String) Then, you create a RDD[Record] and let's call it mobile. Instead of using mobile.registerAsTable("mobile"), can you try the following snippet and see if it works? val mobileSchemaRDD = sqlContext.createSchemaRDD(mobile) mobileSchemaRDD.registerAsTable("mobile") Thanks, Yin On Sun, Jul 20, 2014 at 11:10 PM, Victor Sheng <victorsheng...@gmail.com> wrote: > Hi,Kevin > I tried it on spark1.0.0, it works fine. > It's a bug in spark1.0.1 ... > Thanks, > Victor > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/spark1-0-1-spark-sql-error-java-lang-NoClassDefFoundError-Could-not-initialize-class-line11-read-tp10135p10288.html > Sent from the Apache Spark User List mailing list archive at Nabble.com. >