{"record":{"id":"e07416ec799029a9","repo":"quarkusio/quarkus","slug":"offending-class-is-classname","errorCode":null,"errorMessage":" Offending class is '${className}'","messagePattern":" Offending class is '(.+?)'","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/logging/LoggingResourceProcessor.java","lineNumber":382,"sourceCode":"            boolean isFilterImpl = false;\n            ClassInfo currentClassInfo = classInfo;\n            while ((currentClassInfo != null) && (!JandexUtil.DOTNAME_OBJECT.equals(currentClassInfo.name()))) {\n                boolean hasFilterInterface = false;\n                List<DotName> ifaces = currentClassInfo.interfaceNames();\n                for (DotName iface : ifaces) {\n                    if (FILTER.equals(iface)) {\n                        hasFilterInterface = true;\n                        break;\n                    }\n                }\n                if (hasFilterInterface) {\n                    isFilterImpl = true;\n                    break;\n                }\n                currentClassInfo = index.getClassByName(currentClassInfo.superName());\n            }\n            if (!isFilterImpl) {\n                throw new RuntimeException(\n                        ILLEGAL_LOGGING_FILTER_USE_MESSAGE + \" Offending class is '\" + classInfo.name() + \"'\");\n            }\n\n            String filterName = instance.value(\"name\").asString();\n            if (filtersMap.containsKey(filterName)) {\n                throw new RuntimeException(\"Filter '\" + filterName + \"' was defined multiple times.\");\n            }\n            filtersMap.put(filterName, classInfo.name().toString());\n        }\n        if (!filtersMap.isEmpty()) {\n            result.setNameToFilterClass(filtersMap);\n        }\n\n        return result;\n    }\n\n    @BuildStep(onlyIfNot = IsProduction.class)\n    @Produce(TestSetupBuildItem.class)","sourceCodeStart":364,"sourceCodeEnd":400,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/logging/LoggingResourceProcessor.java#L364-L400","documentation":"discoverLogComponents throws this RuntimeException when a @LoggingFilter annotated class does not (directly or transitively) implement java.util.logging.Filter. Only real Filter implementations can be registered as log filters, so the build fails with ILLEGAL_LOGGING_FILTER_USE_MESSAGE plus the offending class name.","triggerScenarios":"Placing @LoggingFilter(name=\"...\") on a class whose hierarchy does not include java.util.logging.Filter; the build step walks the superclass chain via the Jandex index and fails when no Filter interface is found.","commonSituations":"Annotated class implements a similarly named but different Filter interface (e.g. jakarta.servlet.Filter or a custom one); refactoring removed the java.util.logging.Filter implementation from the hierarchy.","solutions":["Make the annotated class implement java.util.logging.Filter directly.","If it extends a base class, ensure the superclass chain actually implements java.util.logging.Filter and that the class is part of the indexed application.","Check that the right Filter interface is imported (java.util.logging.Filter, not servlet or other Filter types)."],"exampleFix":"// before\n@LoggingFilter(name = \"my-filter\")\npublic class MyFilter { }\n// after\n@LoggingFilter(name = \"my-filter\")\npublic class MyFilter implements java.util.logging.Filter {\n    @Override\n    public boolean isLoggable(LogRecord record) { return false; }\n}","handlingStrategy":"validation","validationCode":"if (!java.util.logging.Filter.class.isAssignableFrom(MyFilter.class)) {\n    throw new IllegalStateException(\"Class with @LoggingFilter must implement java.util.logging.Filter\");\n}","typeGuard":"static boolean implementsJulFilter(Class<?> c) {\n    return java.util.logging.Filter.class.isAssignableFrom(c);\n}","tryCatchPattern":null,"preventionTips":["Check imports: java.util.logging.Filter, not jakarta.servlet.Filter or another Filter type.","Ensure superclasses of the annotated class are in the indexed application so the Jandex walk finds the interface.","Re-verify after refactors that the Filter implementation was not removed."],"tags":["quarkus","build-time","logging","filter","type-mismatch"],"backgroundTag":"illegal-annotation-use","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}