{"record":{"id":"7b2284768cb28123","repo":"quarkusio/quarkus","slug":"class-s-has-no-fields-parameters-containers-are","errorCode":null,"errorMessage":"Class %s has no fields. Parameters containers are only supported if they have at least one annotated field.","messagePattern":"Class (.+?) has no fields\\. Parameters containers are only supported if they have at least one annotated field\\.","errorType":"validation","errorClass":"DeploymentException","httpStatus":null,"severity":"error","filePath":"independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/ServerEndpointIndexer.java","lineNumber":309,"sourceCode":"                    return intMethod;\n                }\n            }\n        }\n        return null;\n    }\n\n    @Override\n    protected boolean handleBeanParam(ClassInfo actualEndpointInfo, Type paramType, MethodParameter[] methodParameters, int i,\n            Set<String> fileFormNames) {\n        ClassInfo beanParamClassInfo = index.getClassByName(paramType.name());\n        InjectableBean injectableBean = scanInjectableBean(beanParamClassInfo,\n                actualEndpointInfo,\n                existingConverters, additionalReaders, injectableBeans, hasRuntimeConverters);\n        if ((injectableBean.getFieldExtractorsCount() == 0) && !injectableBean.isInjectionRequired()) {\n            long declaredMethodsCount = beanParamClassInfo.methods().stream()\n                    .filter(m -> !m.name().equals(\"<init>\") && !m.name().equals(\"<clinit>\")).count();\n            if (declaredMethodsCount == 0) {\n                throw new DeploymentException(String.format(\n                        \"Class %s has no fields. Parameters containers are only supported if they have at least one annotated field.\",\n                        beanParamClassInfo.name()));\n            } else {\n                throw new DeploymentException(String.format(\"No annotations found on fields at '%s'. \"\n                        + \"Annotations like `@QueryParam` should be used in fields, not in methods.\",\n                        beanParamClassInfo.name()));\n            }\n\n        }\n        fileFormNames.addAll(injectableBean.getFileFormNames());\n        return injectableBean.isFormParamRequired();\n    }\n\n    @Override\n    protected boolean doesMethodHaveBlockingSignature(MethodInfo info) {\n        for (var i : methodScanners) {\n            if (i.isMethodSignatureAsync(info)) {\n                return false;","sourceCodeStart":291,"sourceCodeEnd":327,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/resteasy-reactive/server/processor/src/main/java/org/jboss/resteasy/reactive/server/processor/ServerEndpointIndexer.java#L291-L327","documentation":"When a @BeanParam class has no field extractors and requires no injection, ServerEndpointIndexer checks its declared methods; if there are none, the class is completely empty, so deployment fails with this DeploymentException. Parameter containers must have at least one annotated field to be meaningful.","triggerScenarios":"Using an empty POJO as a @BeanParam parameter, e.g. get(@BeanParam MyParams p) where MyParams has no fields and no methods.","commonSituations":"Placeholder/scaffolding bean param classes left empty; refactoring removed all fields but kept the @BeanParam usage; copying a resource signature without the params class contents.","solutions":["Add at least one field annotated with a REST parameter annotation (@QueryParam, @HeaderParam, @PathParam, etc.).","Remove the @BeanParam parameter if no parameters are needed.","If annotations sit on methods, move them onto fields (see the companion error) — an empty class can never be a valid container."],"exampleFix":"// before\nclass UserParams {}\n\n// after\nclass UserParams {\n    @QueryParam(\"name\")\n    String name;\n}","handlingStrategy":"validation","validationCode":"if (UserParams.class.getDeclaredFields().length == 0\n    && UserParams.class.getDeclaredMethods().length == 0) {\n    throw new IllegalStateException(\"@BeanParam class must declare at least one annotated field\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Populate @BeanParam classes with annotated fields at creation.","Run application startup tests in CI.","Remove empty placeholder parameter classes."],"tags":["resteasy-reactive","quarkus","beanparam","deployment-failure","build-time"],"backgroundTag":"empty-bean-param-class","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"}