AnnotatedElementUtils.searchWithGetSemantics() has thrown an AnnotationFormatError

java.lang.annotation.AnnotationFormatError
Javadoc
Thrown when the annotation parser attempts to read an annotation from a class file and determines that the annotation is malformed. This error can be thrown by the {@linkplain java.lang.reflect.AnnotatedElement API used to read annotations reflectively}. @author Josh Bloch @see java.lang.reflect.AnnotatedElement @since 1.5
at java.lang.reflect.Method.getDefaultValue
(Source)
at sun.reflect.annotation.AnnotationType.<init>
(Source)
at sun.reflect.annotation.AnnotationType.getInstance
(Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2
(Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2
(Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations
(Source)
at java.lang.Class.createAnnotationData
(Source)
at java.lang.Class.annotationData
(Source)
at java.lang.Class.getDeclaredAnnotations
(Source)
at org.springframework.core.annotation.AnnotatedElementUtils.searchWithGetSemantics
(Source)
at org.springframework.core.annotation.AnnotatedElementUtils.searchWithGetSemantics
(Source)
11 frames hidden

Typical Exception Messages

  1. Invalid default: public abstract java.lang.Class org.springframework.data.jpa.repository.config.EnableJpaRepositories.repositoryBaseClass()

Origin

We have seen this error pattern in the following webpages (2)

  1. Vadim Marchenkovia Spring JIRA1 year ago
    Failed to introspect annotations on class org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfigureRegistrar$EnableJpaRepositoriesConfiguration
  2. Vadim Marchenkovia Spring JIRA2 years ago
    Failed to introspect annotations on class org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfigureRegistrar$EnableJpaRepositoriesConfiguration