apache/seatunnel · error · IllegalStateException

Server property {} does not contain a usable absolute path

Error message

Server property {} does not contain a usable absolute path

What it means

Thrown after parsing the python.allowed.executables property when, despite non-empty raw input, no usable absolute path survived (e.g. the value contained only commas or whitespace between separators). The parsed allowlist set came out empty, so the policy refuses to continue.

Source

Thrown at seatunnel-connectors-v2/connector-python/src/main/java/org/apache/seatunnel/connectors/seatunnel/python/source/PythonSourceExecutionPolicy.java:95

                    "Server property "
                            + PYTHON_ALLOWED_EXECUTABLES_PROPERTY
                            + " must contain at least one absolute executable path");
        }
        Set<Path> allowedExecutables = new LinkedHashSet<>();
        for (String rawEntry : rawAllowlist.split(",")) {
            String entry = rawEntry.trim();
            if (entry.isEmpty()) {
                continue;
            }
            Path path = Paths.get(entry);
            if (!path.isAbsolute()) {
                throw new IllegalStateException(
                        "Python source allowlist entry must be an absolute path: " + entry);
            }
            allowedExecutables.add(normalize(path));
        }
        if (allowedExecutables.isEmpty()) {
            throw new IllegalStateException(
                    "Server property "
                            + PYTHON_ALLOWED_EXECUTABLES_PROPERTY
                            + " does not contain a usable absolute path");
        }
        return new ArrayList<>(allowedExecutables);
    }

    private static Path resolveConfiguredExecutable(String configuredExecutable)
            throws IOException {
        Path configuredPath = Paths.get(configuredExecutable);
        Path resolvedPath;
        if (configuredPath.isAbsolute()) {
            resolvedPath = normalize(configuredPath);
        } else if (configuredPath.getParent() == null) {
            resolvedPath = resolveCommandFromPath(configuredExecutable);
            if (resolvedPath == null) {
                throw new IOException(
                        "Unable to resolve python.executable from PATH: " + configuredExecutable);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Set the property to at least one real absolute path, e.g. /usr/bin/python3
  2. Print the effective value and inspect for stray separators: echo "$JAVA_OPTS"
  3. Fix the templating/CI variable that should supply the path

Example fix

// before
-Dpython.allowed.executables=,,
// after
-Dpython.allowed.executables=/usr/bin/python3
Defensive patterns

Strategy: validation

Validate before calling

String v = System.getProperty("python.allowed.executables", "");
boolean any = java.util.Arrays.stream(v.split(",")).map(String::trim).anyMatch(s -> !s.isEmpty() && java.nio.file.Paths.get(s).isAbsolute());
if (!any) throw new IllegalStateException("Allowlist has no usable absolute path");

Prevention

When it happens

Trigger: Setting the property to values like ' , , ' or ',,': rawAllowlist.trim() is non-empty so the blank check passes, but every split entry is skipped as empty and allowedExecutables stays empty.

Common situations: A config templating tool rendering the value to only separators; a placeholder like ${PYTHON_PATH} substituting to ',' or spaces; manual editing that left only commas.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/73a86b294f2dcf34. Report an issue: GitHub.