org.apache.spark.sql.avro.AvroFileFormat could not be instantiated

Hi,
I’m using the flowing while starting spark :
spark2-shell --packages org.apache.spark:spark-avro_2.12:2.4.5

But getting the bellow error:

java.util.ServiceConfigurationError: org.apache.spark.sql.sources.DataSourceRegister: Provider org.apache.spark.sql.avro.AvroFileFormat could not be instantiated

The command is working fine on labs. I am sharing the screenshot please have a look at it. Please reply with screenshot of command and error if you are still facing the issue.

And after entering into the spark shell …getting the bellow error while loading the avro file.

scala> val avroDF = spark.read.format(“avro”).load("/user/xxx/xxx/filename.avro")

Please follow the below commands:

spark2-shell --master yarn --conf spark.ui.port=0 --packages com.databricks:spark-avro_2.11:4.0.0

val avroDF = spark.read.format("com.databricks.spark.avro").load("/user/ramchander_chikkala/temp/pyspark/orders_avro")