elastic/elasticsearch · error · IllegalArgumentException

vendor not specified for jdk [${name}]

Error message

vendor not specified for jdk [${name}]

What it means

Thrown by Jdk.finalizeValues() when the vendor Property is unset (vendor.isPresent() == false). It is the third guard in finalizeValues(), after version and platform. Note that setVendor validates against the allowlist, but skipping the setter entirely leaves the Property absent.

Source

Thrown at build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/Jdk.java:200

            }
        };
    }

    private String getHomeRoot() {
        boolean isOSX = "mac".equals(getPlatform()) || "darwin".equals(getPlatform());
        return getPath() + (isOSX ? "/Contents/Home" : "");
    }

    // internal, make this jdks configuration unmodifiable
    void finalizeValues() {
        if (version.isPresent() == false) {
            throw new IllegalArgumentException("version not specified for jdk [" + name + "]");
        }
        if (platform.isPresent() == false) {
            throw new IllegalArgumentException("platform not specified for jdk [" + name + "]");
        }
        if (vendor.isPresent() == false) {
            throw new IllegalArgumentException("vendor not specified for jdk [" + name + "]");
        }
        if (architecture.isPresent() == false) {
            throw new IllegalArgumentException("architecture not specified for jdk [" + name + "]");
        }
        version.finalizeValue();
        platform.finalizeValue();
        vendor.finalizeValue();
        architecture.finalizeValue();
        distributionVersion.finalizeValue();
    }

    @Override
    public Iterator<File> iterator() {
        return configuration.iterator();
    }

    private void parseVersion(String version) {
        // decompose the bundled jdk version, broken into elements as: [feature, interim, update, build]

View on GitHub (pinned to db6a809a66)

Solutions

  1. Add vendor = '<adoptium|openjdk|zulu>' to the named jdk block.
  2. Remove the partially-configured jdk declaration if it is unused.

Example fix

// before
jdks { j { version='21.0.3+9'; platform='linux'; architecture='x64'; } }
// after
jdks { j { version='21.0.3+9'; platform='linux'; architecture='x64'; vendor='adoptium'; } }
Defensive patterns

Strategy: validation

Validate before calling

// Ensure the vendor property is set before resolution:
jdks {
  my_jdk {
    version = '21.0.3+9'
    platform = 'linux'
    architecture = 'x64'
    vendor = 'adoptium'   // <-- required, no default
  }
}

Prevention

When it happens

Trigger: A Jdk is declared with version and platform but setVendor(...) is never called, then the configuration is resolved.

Common situations: Forgetting the vendor line in a jdk block; assuming 'openjdk' is the implicit default (there is none).

Related errors


AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12). Data as JSON: /api/errors/80e4e12a4dcee299. Report an issue: GitHub.