0

I have a POJO with lombok builder annotation on it. My project creates a fat-jar to deploy in a workflow orchestrated by apache airflow, executed as a flink job.

Deployment works fine, while running i get a noclassdeffounderror on the lombok builder call.

java.lang.NoClassDefFoundError: com.Pojo$PojoBuilder
    at com.Pojo.builder(Pojo.java:10)

I checked the decompiled fat-jar on my machine and the pojo class has the builder. Any idea what may be causing this issue?

May not be able to share exact code due to corp rules.

Adhiraj
  • 3
  • 4

1 Answers1

2

Your builder probably depends on a class that is missing in the fat-jar or one of those classes has static code that failed to run.

NoClassDefFoundError is a second-hand error. There should be another or earlier error with why it can't load the class. For details, see Why am I getting a NoClassDefFoundError in Java?

Aaron Digulla
  • 321,842
  • 108
  • 597
  • 820