Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1540

Misleading error message when an interceptor is not a bean

XMLWordPrintable

      When a bean archive is set to bean-discovery-mode="annotated" and an @Interceptor does not have @Dependent, the error message is very misleading (and incorrect): WELD-001417: Enabled interceptor class <class>nl.topicus.digdag.bean.rest.RequestClosingInterceptor</class> in vfs:/home/papegaaij/wildfly-8.0.0.Beta2-SNAPSHOT/standalone/deployments/digdag-authenticator.war/WEB-INF/lib/digdag-common-1.2-SNAPSHOT.jar/META-INF/beans.xml@6 is neither annotated @Interceptor nor registered through a portable extension

      The class does have the @Interceptor annotation, but is not loaded as a bean, due to the missing @Dependent annotation. I'd expect WELD to report that the class does not have @Dependent. Perhaps WELD can check if the class is available and actually check the annotations and report accordingly?

              mkouba@redhat.com Martin Kouba
              papegaaij Emond Papegaaij
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: