java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by manisha803
, 1 year ago
Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
via GitHub by cdriesch
, 1 year ago
Found class org.apache.hadoop.mapreduce.TaskAttemptContext, but interface was expected
via teradata.com by Unknown author, 1 year ago
Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
via teradata.com by Unknown author, 1 year ago
Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
via Stack Overflow by caesar0301
, 2 years ago
Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.TaskAttemptContext, but class was expected
at com.databricks.spark.avro.AvroOutputWriter.(AvroOutputWriter.scala:82)
at com.databricks.spark.avro.AvroOutputWriterFactory.newInstance(AvroOutputWriterFactory.scala:31)
at org.apache.spark.sql.sources.DefaultWriterContainer.initWriters(commands.scala:470)
at org.apache.spark.sql.sources.BaseWriterContainer.executorSideSetup(commands.scala:360)
at org.apache.spark.sql.sources.InsertIntoHadoopFsRelation.org$apache$spark$sql$sources$InsertIntoHadoopFsRelation$$writeRows$1(commands.scala:172)
at org.apache.spark.sql.sources.InsertIntoHadoopFsRelation$$anonfun$insert$1.apply(commands.scala:160)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:63)
at org.apache.spark.scheduler.Task.run(Task.scala:70)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.