0

I'm having this error: No processor claimed any of these annotations: org.apache.avro.specific.AvroGenerated

How I got the error:

I was trying to implement an Avro serialize and deserialize. So, I generated an Avro Class out of .avsc file using an sbt-avro plugin.

The generated Avro Class has an annotation above @org.apache.avro.specific.AvroGenerated. I tried commenting it out, it didn't solve the issue, and generated classes shouldn't be manually edited.

I kinda searched for this kind of error and it told me to add something to pom xml. However, I'm not sure how, so even after trying to add it in the pom, error still persists.

Is there a sample pom xml that fixes this issue so I can use it as a guide? Or is there any workaround for this? Thanks.

Code Geek
  • 755
  • 2
  • 6
  • 17
  • This should just be a harmless warning. The AvroGenerated annotation is just an informative runtime tag, which indicates that this class was generated by Avro. It does not need to be processed by any (compiler) plugin. You need to describe your project in more detail for anyone to pinpoint the problem. Start with the full error message, and when it occurs, and from which tool (java?)... – cbley Mar 15 '21 at 11:59
  • 1
    You can add `-Xlint:-processing` to your Java compiler arguments to silence this warning. – cbley Mar 15 '21 at 12:04
  • Hi @cbley, unfortunately the spark job server does not ignore these kinds of warning. The server won't start unless it's resolved. So to describe the project, I'm currently creating a spark job that will write data to HBase using Avro serialization. However, I can't run the job itself due to the compilation error caused by the warning. – Code Geek Mar 16 '21 at 02:30

1 Answers1

1

Thanks @cbley, the solution worked, I just had a hard time finding where to put it. I'm running sbt compile and spark-job-server start so I had to add it in our builds.sbt

javacOptions ++= Seq(
 "-Xlint:-processing"
)
Code Geek
  • 755
  • 2
  • 6
  • 17