{"record":{"id":"9a0714f836daa334","repo":"apache/druid","slug":"s-s","errorCode":null,"errorMessage":"%s - %s","messagePattern":"%s - %s","errorType":"validation","errorClass":"ProvisionException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/guice/JsonConfigurator.java","lineNumber":200,"sourceCode":"              JsonProperty annotation = theField.getAnnotation(JsonProperty.class);\n              final boolean noAnnotationValue = annotation == null || Strings.isNullOrEmpty(annotation.value());\n              final String pathPart = noAnnotationValue ? fieldName : annotation.value();\n              if (path.length() == 0) {\n                path.append(pathPart);\n              } else {\n                path.append(\".\").append(pathPart);\n              }\n            }\n          }\n        }\n        catch (NoSuchFieldException e) {\n          throw new RuntimeException(e);\n        }\n\n        messages.add(StringUtils.format(\"%s - %s\", path.toString(), violation.getMessage()));\n      }\n\n      throw new ProvisionException(\n          Iterables.transform(\n              messages,\n              new Function<>()\n              {\n                @Override\n                public Message apply(String input)\n                {\n                  return new Message(StringUtils.format(\"%s%s\", propertyBase, input));\n                }\n              }\n          )\n      );\n    }\n\n    log.debug(\"Loaded class[%s] from props[%s] as [%s]\", clazz, propertyBase, config);\n\n    return config;\n  }","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/guice/JsonConfigurator.java#L182-L218","documentation":"During Guice configuration binding, JsonConfigurator validates each property against its Bean Validation (JSR-303) annotations (e.g. @NotNull, @Min). This error aggregates one line per violation: '<property path> - <violation message>'. It wraps the collected messages in a ProvisionException so all validation problems surface at startup rather than one at a time.","triggerScenarios":"configurate() binds a config class, deserializes properties into the instance via Jackson, then runs the Validator; any constraint violation on the populated bean produces this message and the surrounding ProvisionException.","commonSituations":"Runtime properties files with out-of-range numbers (druid.server.http.numThreads=-1), missing required values marked @NotNull/@NotBlank, or @Max/@Min violations on tuning configs passed via -D flags.","solutions":["Read the property path and violation message in the error to identify the offending config key","Fix the value of the listed property in runtime.properties or the -D flag to satisfy the constraint annotation","Check the config class source for the annotation (e.g. @Min, @NotNull) to learn the allowed range","If the property is intentionally unused, remove it entirely instead of leaving an invalid placeholder value"],"exampleFix":"// before (runtime.properties)\ndruid.server.http.numThreads=-1\n// after\ndruid.server.http.numThreads=10","handlingStrategy":"validation","validationCode":"Set<ConstraintViolation<Object>> violations = validator.validate(configInstance);\nif (!violations.isEmpty()) {\n  violations.forEach(v -> System.err.println(v.getPropertyPath() + \" - \" + v.getMessage()));\n  throw new IllegalArgumentException(\"config validation failed\");\n}","typeGuard":null,"tryCatchPattern":"try { injector = Guice.createInjector(...); } catch (ProvisionException e) { log.error(\"Invalid config: {}\", e.getMessage()); throw e; }","preventionTips":["Add JSR-303 constraint annotations to config classes and unit-test them with sample runtime.properties","Lint runtime.properties in CI against expected key/value ranges","Fail the deploy pipeline if config validation would violate constraints"],"tags":["guice","configuration","bean-validation","startup"],"backgroundTag":"invalid-config-value","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}