apache/maven · error · DIException
More than one qualifier annotation on {}
Error message
More than one qualifier annotation on {} What it means
Error "More than one qualifier annotation on {}" thrown in apache/maven.
Source
Thrown at impl/maven-di/src/main/java/org/apache/maven/di/impl/ReflectionUtils.java:87
if (!field.isSynthetic() || !field.getName().startsWith("this$") || field.getType() != enclosingClass) {
continue;
}
field.setAccessible(true);
try {
return field.get(innerClassInstance);
} catch (IllegalAccessException e) {
throw new RuntimeException(e);
}
}
return null;
}
public static @Nullable Object qualifierOf(AnnotatedElement annotatedElement) {
Object qualifier = null;
for (Annotation annotation : annotatedElement.getDeclaredAnnotations()) {
if (annotation.annotationType().isAnnotationPresent(Qualifier.class)) {
if (qualifier != null) {
throw new DIException("More than one qualifier annotation on " + annotatedElement);
}
if (annotation instanceof Named named) {
qualifier = named.value();
} else {
Class<? extends Annotation> annotationType = annotation.annotationType();
qualifier = annotationType.getDeclaredMethods().length == 0 ? annotationType : annotation;
}
}
}
return qualifier;
}
public static @Nullable Annotation scopeOf(AnnotatedElement annotatedElement) {
Annotation scope = null;
for (Annotation annotation : annotatedElement.getDeclaredAnnotations()) {
if (annotation.annotationType().isAnnotationPresent(org.apache.maven.api.di.Scope.class)) {
if (scope != null) {
throw new DIException("More than one scope annotation on " + annotatedElement);View on GitHub (pinned to e4093d4e12)
When it happens
Trigger: Thrown at impl/maven-di/src/main/java/org/apache/maven/di/impl/ReflectionUtils.java:87 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/maven@e4093d4e12 (2026-08-21).
Data as JSON: /api/errors/1b406d1bac1586ba.
Report an issue: GitHub.