Java & JVM
Maven, Gradle, and JVM failures in CI - resolved.
Resolve Java build failures: Maven and Gradle dependency errors, JVM heap exhaustion, daemon problems, toolchain mismatches, and test failures. Clear fixes for CI pipelines.
Maven
Dependency resolution, plugins, and repositories.
"NoSuchMethodError" (AssertJ/Mockito)Fix java.lang.NoSuchMethodError in AssertJ or Mockito tests in CI - a transitive dependency pins an older
"must declare at least one ArgumentsSource"Fix JUnit 5 "Configuration error: ... must declare at least one ArgumentsSource" / "junit-jupiter-params not
JUnit 5 tests not running (engine missing)Fix JUnit 5 tests being skipped in CI - Surefire/Gradle needs the JUnit Platform plus jupiter-engine, and
"Could not find SNAPSHOT artifact"Fix Maven "Could not find artifact ...:SNAPSHOT in snapshots" in CI - a SNAPSHOT dependency was never
"Could not transfer artifact ... 401/403"Fix Maven "Could not transfer artifact ... authentication failed ...
"error: release version 17 not supported"Fix Maven "error: release version 17 not supported" in CI - the maven.compiler.release is newer than the JDK
"Failed to execute goal spring-boot:repackage"Fix Maven "Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:repackage" in CI -
"invalid target release"Fix Maven "Fatal error compiling: invalid target release: 21" in CI - the JDK running Maven is older than the
"mvn: command not found"Fix "mvn: command not found" / "mvn: not found" in CI - Maven is not installed on the runner or not on PATH.
"PKIX path building failed"Fix Maven "PKIX path building failed: unable to find valid certification path" in CI - the JDK truststore
"Dependency convergence error"Fix Maven Enforcer "Failed while enforcing releasability ... Dependency convergence error" in CI - the same
"required a bean that could not be found"Fix Spring "Parameter N of constructor in X required a bean of type Y that could not be found" in CI - a
"@MockBean leaks between tests"Fix Spring Boot "@MockBean stubs leak between tests" in CI - stale stubbing or recorded interactions carry
"Could not connect to Ryuk"Fix Testcontainers "Could not start container" / "Timed out waiting for container ...
Gradle
Daemon, cache, and build script errors.
":compileJava" - "cannot find symbol"Fix Gradle ":compileJava FAILED" with "error: cannot find symbol" in CI - a missing dependency on the compile
"Build cache is disabled"Fix Gradle "Build cache is disabled" in CI - the cache flag is off, so every task re-runs from scratch and
"N problems were found storing the configuration cache"Fix Gradle "Configuration cache problems found" / "invocation of Task.project at execution time is
"Could not get unknown property"Fix Gradle "Could not get unknown property 'x' for <object>" in CI - a referenced project/ext/version-catalog
"Could not resolve ... kotlin-stdlib"Fix "Could not resolve org.jetbrains.kotlin:kotlin-stdlib:<version>" in CI - Gradle cannot find or agree on
"Could not resolve"Fix Gradle "Could not resolve <dependency>" / "Could not find" in CI - wrong coordinates, a missing
"Could not PUT ... 401 Unauthorized"Fix Gradle maven-publish "Could not PUT ... received status code 401 from server: Unauthorized" in CI -
"Using insecure protocols ... is unsupported"Fix Gradle 7+ "Using insecure protocols with repositories, without explicit opt-in, is unsupported" in CI -
"does not \"opens\" ... to unnamed module" (test)Fix Gradle test failures on JDK 17+ with "InaccessibleObjectException: module java.base does not \"opens\"
"cannot find symbol" (Lombok)Fix javac "cannot find symbol: method getX()" with Lombok in CI - annotation processing is off or Lombok is
"No implementation was created for Mapper"Fix MapStruct "No implementation was created for ...Mapper due to having a problem in the erroneous element"
JVM memory & runtime
Heap, metaspace, and OutOfMemoryError.
"Gradle build daemon disappeared unexpectedly"Fix Gradle "build daemon disappeared unexpectedly" during tests in CI - the daemon JVM was killed, usually by
"Gradle out of memory"Fix Gradle running out of memory in CI -- the daemon or a worker hits "java.lang.OutOfMemoryError: Java heap
"unable to create new native thread"Fix "java.lang.OutOfMemoryError: unable to create new native thread" in CI - the process hit the OS
"ContainerLaunchException: Container startup failed"Fix Testcontainers "Container startup failed" in CI - a container did not become ready (wait strategy, image
Toolchain & versions
JDK selection and bytecode mismatches.
"No locally installed toolchains match"Fix Gradle "No matching toolchains found ... No locally installed toolchains match (and auto-detect/download
"No matching toolchains found"Fix Gradle "No matching toolchains found for requested specification" in CI - the requested JDK is not
"No compatible toolchains found"Fix Gradle "No compatible toolchains found for request ... (auto-detect false / auto-download false)" in CI -
"module does not read module"Fix javac/java "module X does not read module Y" in CI - a JPMS module uses a type from another module
"which does not export it"Fix javac "package X is declared in module Y, which does not export it to module Z" in CI - JPMS strong
"source release 17 requires target release 17"Fix javac "error: source release 17 requires target release 17" in CI - mismatched maven.compiler.source and
"Unsupported class file major version 65"Fix "Unsupported class file major version 65" in CI - a bytecode-manipulation tool (ASM in a plugin) cannot
"Build to ... failed" (Jib)Fix Jib (jib-maven-plugin) and spring-boot:build-image failures in CI - registry auth (401/403), an
"Cannot find matching toolchain"Fix Maven "Cannot find matching toolchain definitions for the following toolchain types: jdk" in CI -
Explore other topics
GitHub ActionsWorkflow, runner, and YAML errors - diagnosed and fixed.
Node.js & npmnpm, yarn, and pnpm failures in CI - solved.
DockerBuild, run, compose, and registry errors - explained.
Pythonpip, poetry, venv, and pytest failures - fixed.
GoGo build, module, and test failures - diagnosed.
RustCargo and toolchain failures in CI - fixed.