apache/druid · error · IllegalStateException

Property[%s] not specified.

Error message

Property[%s] not specified.

What it means

PropUtils.getProperty fetches a property from a Properties object and treats absence as a fatal condition: if props.getProperty returns null (or the value is the empty string mapped as null), it throws IllegalStateException naming the missing key. It expresses 'this property is required'.

Source

Thrown at processing/src/main/java/org/apache/druid/common/utils/PropUtils.java:35

 * under the License.
 */

package org.apache.druid.common.utils;

import org.apache.druid.java.util.common.ISE;

import java.util.Properties;

/**
 */
public class PropUtils
{
  public static String getProperty(Properties props, String property)
  {
    String retVal = props.getProperty(property);

    if (retVal == null) {
      throw new ISE("Property[%s] not specified.", property);
    }

    return retVal;
  }

  public static int getPropertyAsInt(Properties props, String property)
  {
    return getPropertyAsInt(props, property, null);
  }

  public static int getPropertyAsInt(Properties props, String property, Integer defaultValue)
  {
    String retVal = props.getProperty(property);

    if (retVal == null) {
      if (defaultValue == null) {
        throw new ISE("Property[%s] not specified.", property);
      } else {

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Add the missing property to runtime.properties / the Properties object with a valid value
  2. Verify the exact property name (typos and case) and that the config file is actually on the classpath/being loaded
  3. Use props.getProperty(key, defaultValue) if the property is genuinely optional
  4. Check version upgrade notes: the property may have been renamed or removed

Example fix

// before
String mode = PropUtils.getProperty(props, "druid.zk.service.compress.list"); // ISE if unset
// after
String mode = props.getProperty("druid.zk.service.compress.list", "list"); // or set the property in runtime.properties
Defensive patterns

Strategy: validation

Validate before calling

String v = props.getProperty(key);
if (v == null) { throw new IllegalStateException("set required property " + key + " in runtime.properties"); }

Try / catch

try { String v = PropUtils.getProperty(props, key); } catch (IllegalStateException e) { /* supply default or fail fast with actionable message */ }

Prevention

When it happens

Trigger: Calling getProperty(props, key) where the key was never set in the Properties object — missing runtime.properties entry, config not passed to an embedded node, or a typo'd property name.

Common situations: Deployments missing required druid.* config properties; renaming a property across Druid versions so old config files lack the new key; programmatic Properties built in tests missing keys; extensions reading properties not documented as required.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/37b4dd09e215aeff. Report an issue: GitHub.