projectlombok/lombok · error
${element} ${message}
Error message
${element} ${message} What it means
SpiProcessor.report raises a RuntimeException with '<element> <message>' because in Eclipse annotation processing round, printed Kind.ERROR messages are silently ignored, so the processor throws instead to surface the problem.
Solutions
- Read the thrown message: it names the element and the actual problem
- Fix the SPI provider declaration flagged in the message (implement the required interface, correct the class)
- Run the build outside Eclipse (javac/Gradle) to get the error as a normal diagnostic
- Check that the annotated class matches what the SPI annotation expects
Example fix
// before
@Provider(MyService.class)
public class MyImpl { }
// after
@Provider(MyService.class)
public class MyImpl implements MyService { } Defensive patterns
Strategy: try-catch
Validate before calling
if (!typeElement.getInterfaces().stream().anyMatch(i -> i.toString().equals(providerInterface))) {
throw new IllegalStateException("provider must implement " + providerInterface);
} Try / catch
try { compileWithProcessor(); } catch (RuntimeException e) { if (e.getMessage().contains("simpleName") || wasThrownBySpiProcessor(e)) reportAsDiagnostic(e.getMessage()); else throw e; } Prevention
- Ensure @Provider-annotated classes implement the advertised interface
- Compile with javac/Gradle rather than relying on Eclipse's messager for this processor
- Read the thrown message — it states the element and the exact problem
When it happens
Trigger: handleProvidingElement detects an invalid @Provider-style SPI declaration (e.g. provider class not implementing the advertised interface) and calls report; under Eclipse this always throws.
Common situations: Using lombok's SPI annotation processor with a misdeclared service provider class; running annotation processing inside Eclipse where normal messaging fails.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Cannot obtain canonical path to parent directory
- Cannot obtain canonical path to dependency
- Not an annotation type
- I/O problem during delombok
- @Delegate does not support recursion (delegating to a type…
AI-assisted analysis of projectlombok/lombok@6d6a3e9fec (2026-09-07).
Data as JSON: /api/errors/b98ff419bb353a87.
Report an issue: GitHub.
Appendix: source
Thrown at src/spiProcessor/lombok/spi/SpiProcessor.java:247
}
private Name getQualifiedTypeName(AnnotationMirror mirror) {
Element elem = mirror.getAnnotationType().asElement();
if (!(elem instanceof TypeElement)) return null;
return ((TypeElement) elem).getQualifiedName();
}
private TypeElement toElement(TypeMirror typeMirror) {
if (typeMirror instanceof DeclaredType) {
Element asElement = ((DeclaredType) typeMirror).asElement();
if (asElement instanceof TypeElement) return (TypeElement) asElement;
}
return null;
}
private void report(Element elem, String message) {
/* In eclipse, messages just seem to get ignored, so we throw instead. */
if (Boolean.TRUE) throw new RuntimeException(elem.getSimpleName() + " " + message);
processingEnv.getMessager().printMessage(Kind.ERROR, elem.getSimpleName() + " " + message, elem);
}
private String createProperQualifiedName(TypeElement provider) {
return processingEnv.getElementUtils().getBinaryName(provider).toString();
}
}
View on GitHub (pinned to 6d6a3e9fec)