{"record":{"id":"099078e3c7a50f11","repo":"apache/druid","slug":"some-value-must-be-configured-for-s","errorCode":null,"errorMessage":"Some value must be configured for [%s]","messagePattern":"Some value must be configured for \\[(.+?)\\]","errorType":"validation","errorClass":"ProvisionException","httpStatus":null,"severity":"error","filePath":"processing/src/main/java/org/apache/druid/guice/PolyBind.java","lineNumber":189,"sourceCode":"    {\n      final ParameterizedType mapType = Types.mapOf(\n          String.class, Types.newParameterizedType(Provider.class, key.getTypeLiteral().getType())\n      );\n\n      final Map<String, Provider<T>> implsMap;\n      if (key.getAnnotation() != null) {\n        implsMap = (Map<String, Provider<T>>) injector.getInstance(Key.get(mapType, key.getAnnotation()));\n      } else if (key.getAnnotationType() != null) {\n        implsMap = (Map<String, Provider<T>>) injector.getInstance(Key.get(mapType, key.getAnnotationType()));\n      } else {\n        implsMap = (Map<String, Provider<T>>) injector.getInstance(Key.get(mapType));\n      }\n\n      String implName = props.getProperty(property);\n      if (implName == null) {\n        if (defaultPropertyValue == null) {\n          if (defaultKey == null) {\n            throw new ProvisionException(StringUtils.format(\"Some value must be configured for [%s]\", key));\n          }\n          return injector.getInstance(defaultKey);\n        }\n        implName = defaultPropertyValue;\n      }\n      final Provider<T> provider = implsMap.get(implName);\n\n      if (provider == null) {\n        throw new ProvisionException(\n            StringUtils.format(\"Unknown provider [%s] of %s, known options [%s]\", implName, key, implsMap.keySet())\n        );\n      }\n\n      return provider.get();\n    }\n  }\n}\n","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/processing/src/main/java/org/apache/druid/guice/PolyBind.java#L171-L207","documentation":"PolyBind.createChoice returns a provider that selects an implementation based on a runtime property. When neither the property is set nor any default property value or default binding key exists, the choice cannot be resolved and PolyBind.get throws ProvisionException 'Some value must be configured for [<key>]'.","triggerScenarios":"The Provider<T>.get() reads props.getProperty(property) and gets null while defaultPropertyValue == null and defaultKey == null (i.e. PolyBind.createChoice called without .defaultProperty or .defaultBind).","commonSituations":"Missing required property like druid.storage.type or druid.indexer.task.storage.type in runtime.properties; deployment template removed the property; using createChoice without supplying a default in a custom extension.","solutions":["Set the required property in runtime.properties, e.g. druid.storage.type=local or s3","Call .defaultProperty(...) or default to a bound key in the PolyBind.createChoice builder in the extension/module code","Check the docs for the subsystem to find which property key it expects"],"exampleFix":"// before (runtime.properties) — druid.storage.type not set\n// after\ndruid.storage.type=local","handlingStrategy":"validation","validationCode":"if (System.getProperty(\"druid.storage.type\") == null && properties.getProperty(\"druid.storage.type\") == null) {\n  throw new IllegalStateException(\"druid.storage.type must be set\");\n}","typeGuard":null,"tryCatchPattern":"try { injector.getInstance(key); } catch (ProvisionException e) { if (e.getMessage().startsWith(\"Some value must be configured\")) log.error(\"Set required property: {}\", e.getMessage()); throw e; }","preventionTips":["Ship a baseline runtime.properties that always includes required choice keys (storage type, emitter, etc.)","Use PolyBind.createChoice with .defaultProperty(...) for non-mandatory choices","Add a preflight config check to the deployment pipeline"],"tags":["guice","configuration","polybind","startup"],"backgroundTag":"missing-required-config-field","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"}