{"record":{"id":"fa7693f1c16b52ea","repo":"quarkusio/quarkus","slug":"invalid-annotation-target-target","errorCode":null,"errorMessage":"Invalid annotation target: <target>","messagePattern":"Invalid annotation target: <target>","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/devui/DevBeanInfo.java","lineNumber":76,"sourceCode":"                isApplicationBean = predicate.test(bean.getDeclaringBean().getBeanClass());\n                declaringClass = Name.from(bean.getDeclaringBean().getBeanClass());\n                isGenerated = bean.getDeclaringBean().getImplClazz().isSynthetic();\n            } else if (target.kind() == Kind.FIELD) {\n                FieldInfo field = target.asField();\n                memberName = field.name();\n                kind = DevBeanKind.FIELD;\n                isApplicationBean = predicate.test(bean.getDeclaringBean().getBeanClass());\n                declaringClass = Name.from(bean.getDeclaringBean().getBeanClass());\n                isGenerated = bean.getDeclaringBean().getImplClazz().isSynthetic();\n            } else if (target.kind() == Kind.CLASS) {\n                ClassInfo clazz = target.asClass();\n                kind = DevBeanKind.CLASS;\n                memberName = null;\n                isApplicationBean = predicate.test(clazz.name());\n                isGenerated = clazz.isSynthetic();\n                declaringClass = null;\n            } else {\n                throw new IllegalArgumentException(\"Invalid annotation target: \" + target);\n            }\n            return new DevBeanInfo(bean.getIdentifier(), kind, isApplicationBean, providerType, memberName, types, qualifiers,\n                    scope, declaringClass,\n                    interceptors, isGenerated);\n        } else {\n            // Synthetic bean\n            return new DevBeanInfo(bean.getIdentifier(), DevBeanKind.SYNTHETIC, false, providerType, null, types, qualifiers,\n                    scope, null,\n                    interceptors, bean.getImplClazz().isSynthetic());\n        }\n    }\n\n    public DevBeanInfo(String id, DevBeanKind kind, boolean isApplicationBean, Name providerType, String memberName,\n            Set<Name> types,\n            Set<Name> qualifiers, Name scope, Name declaringClass, List<String> boundInterceptors,\n            boolean isGenerated) {\n        this.id = id;\n        this.kind = kind;","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/arc/deployment/src/main/java/io/quarkus/arc/deployment/devui/DevBeanInfo.java#L58-L94","documentation":"DevBeanInfo.from() converts a BeanInfo into a Dev UI JSON model. It inspects the bean's annotation target kind to determine whether the bean is a producer method, producer field, or class-based bean; any other target kind is rejected with IllegalArgumentException('Invalid annotation target: <target>').","triggerScenarios":"Rendering Dev UI bean info for a bean whose BeanInfo.getAnnotationTarget() is a non-null kind other than METHOD, FIELD, or CLASS — e.g. a parameter target or an unusual synthetic bean target produced by a custom extension.","commonSituations":"Custom extensions registering synthetic/odd beans whose targets confuse the Dev UI bean renderer; ArC internal changes making new target kinds visible in the beans list; opening Dev UI beans page in an app with such beans.","solutions":["Find the bean/extension producing the unusual annotation target (name is printed in the message) and fix its registration","Update Quarkus — the Dev UI renderer may already support more target kinds in newer versions","Temporarily remove the offending synthetic bean registration to confirm the source extension","Report the issue to the extension maintainer / Quarkus with the Dev UI bean identifier"],"exampleFix":"// before (extension): bean registered with an unusual parameter target\n// after: register as a normal class-based synthetic bean\nSyntheticBeanBuildItem.configure(MyBean.class).types(MyBean.class).scope(Singleton.class)\n    .supplier(recorder.create()).done();","handlingStrategy":"validation","validationCode":"AnnotationTarget t = bean.getAnnotationTarget();\nif (t != null && t.kind() != AnnotationTarget.Kind.CLASS\n    && t.kind() != AnnotationTarget.Kind.METHOD\n    && t.kind() != AnnotationTarget.Kind.FIELD) {\n    // skip Dev UI rendering for this bean\n}","typeGuard":"static boolean hasRenderableTarget(BeanInfo bean) {\n    AnnotationTarget.Kind k = bean.getAnnotationTarget() == null ? null : bean.getAnnotationTarget().kind();\n    return k == null || k == AnnotationTarget.Kind.CLASS || k == AnnotationTarget.Kind.METHOD || k == AnnotationTarget.Kind.FIELD;\n}","tryCatchPattern":null,"preventionTips":["Register synthetic beans with standard class-based targets","Keep extensions and Quarkus core versions aligned","Reproduce with the Dev UI beans page when adding new synthetic beans"],"tags":["dev-ui","cdi","synthetic-bean","build-time"],"backgroundTag":"invalid-annotation-target-kind","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}