Spark 2.2.1 error when running the commands from spark API documentation

Hi, I successfully launched spark 2.2.1 from the clodxlab web console but when I try to execute the below command which is picked from Spark 2.21 API documentation it was throwing the error how to resolve the error please let me know Thank you

import org.apache.spark.sql.SparkSession

sucess

val spark = SparkSession.builder().appName(“Spark SQL basic example”).config(“spark.some.config.option”, “some-value”).getOrCreate()

Failure

error : java.lang.IllegalArgumentException: Error while instantiating ‘org.apache.spark.sql.hive.HiveSessionStateBuilder’:

Hi @yerranagu_madhu
Got the answer to this question ?