apache/beam · error · StopExecutionException

BigQueryMetastoreCatalog doesn't support Java 8

Error message

BigQueryMetastoreCatalog doesn't support Java 8

What it means

The Iceberg IO integration test suite in Beam throws StopExecutionException when the build runs on Java 8, because BigQueryMetastoreCatalog tests rely on APIs unavailable in Java 8. It is a deliberate build-time guard, not a runtime failure.

Solutions

  1. Run the build/tests with JDK 11 or newer (set JAVA_HOME or org.gradle.java.home).
  2. Use Gradle toolchain options (-Pjava11Home / --java11-home style flags used in Beam builds) to select a newer JVM for test execution.
  3. Skip the BigQueryMetastoreCatalog tests on Java 8 if Java 8 execution is mandatory.

Example fix

// before
JAVA_HOME=/usr/lib/jvm/java-8-openjdk ./gradlew :sdks:java:io:iceberg:integrationTest
// after
JAVA_HOME=/usr/lib/jvm/java-17-openjdk ./gradlew :sdks:java:io:iceberg:integrationTest
Defensive patterns

Strategy: validation

Validate before calling

if [[ "$JAVA_VERSION" == 1.8* || "$JAVA_VERSION" == 8* ]]; then echo 'Use JDK 11+ for Iceberg tests'; exit 1; fi

Prevention

When it happens

Trigger: Running `./gradlew :sdks:java:io:iceberg:...` Iceberg tests (e.g. BigQueryMetastoreCatalogIT) with a Java 8 toolchain/JVM, where the `usingJava8` flag is true in the doLast block.

Common situations: CI pipelines still pinned to JDK 8 running the full Java test matrix; developers with JAVA_HOME pointing at Java 8 trying to execute Iceberg integration tests.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/bde33ec67482a8b2. Report an issue: GitHub.

Appendix: source

Thrown at sdks/java/io/iceberg/build.gradle:234

    }
    systemProperty "beamTestPipelineOptions", JsonOutput.toJson(args)

    // Disable Gradle cache: these ITs interact with live service that should always be considered "out of date"
    outputs.upToDateWhen { false }

    filter {
        includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.BigQueryMetastoreCatalogIT.testRead'
        includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.BigQueryMetastoreCatalogIT.testReadWithFilter'
        includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.BigQueryMetastoreCatalogIT.testStreamingRead'
        includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.BigQueryMetastoreCatalogIT.testWrite'
        includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.BigQueryMetastoreCatalogIT.testWriteRead'
        includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.BigQueryMetastoreCatalogIT.testReadWriteStreaming'
        includeTestsMatching 'org.apache.beam.sdk.io.iceberg.catalog.BigQueryMetastoreCatalogIT.testStreamToPartitionedDynamicDestinations'
    }

    doLast {
        if (usingJava8) {
            throw new StopExecutionException("BigQueryMetastoreCatalog doesn't support Java 8");
        }
    }

    maxParallelForks 4
    classpath = sourceSets.test.runtimeClasspath
    testClassesDirs = sourceSets.test.output.classesDirs
}

task loadTest(type: Test) {
    systemProperty "beamTestPipelineOptions", JsonOutput.toJson([
            "--project=${gcpProject}",
            "--tempLocation=${gcpTempLocation}",
            "--testSize=large",
            "--runner=DataflowRunner",
            "--region=us-central1"
    ])

    // Disable Gradle cache: these ITs interact with live service that should always be considered "out of date"

View on GitHub (pinned to 12126d8942)