apache/beam · error · GradleException
Javadoc not generated. Check logs for errors
Error message
Javadoc not generated. Check logs for errors
What it means
Beam's javadoc Gradle task sets failOnError=false so warnings do not break the build, but afterwards it checks whether docs/javadoc/index.html was produced. If the Javadoc tool failed hard enough that no index.html exists, the build throws this GradleException.
Solutions
- Rerun the task and inspect the build logs above the failure for the actual javadoc errors.
- Fix the reported Javadoc issues (broken @link/@param tags, missing comments, unresolvable references).
- Run with --info or --debug to see the exact javadoc command output if the log is not clear.
Defensive patterns
Strategy: validation
Validate before calling
./gradlew :sdks:java:javadoc:javadoc --info | grep -i 'error\|warning'
Prevention
- Run javadoc locally before CI and read the warnings.
- Keep doc comments lint-clean (valid @link/@param tags) when adding new APIs.
When it happens
Trigger: Running `./gradlew :sdks:java:javadoc:javadoc` when the javadoc tool exits with errors (bad doc comments, broken links, missing sources) so severe that no output index.html is generated.
Common situations: Adding a new class with malformed Javadoc tags or invalid {@link} references; JDK version change making previously tolerated doc errors fatal; missing dependencies on the javadoc classpath.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- BigQueryMetastoreCatalog doesn't support Java 8
- error occurred
- Unknown yamlTestSet: . Must be one of 'data', 'databases'…
- cannot pull dev versions of JARs, please run "gradlew
- Could not find in
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/2f08f82545d21d0f.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/javadoc/build.gradle:99
links createJavadocIOUrlForDependency(dep)
}
}
// certain projects need generated sources for javadoc generation
// Part of flink sources came from custom copySourceOverrides target
dependsOn ":runners:flink:${flink_versions.split(",").first()}:copySourceOverrides"
// Auto value class appeared in class annotation (jackson)
dependsOn ':sdks:java:io:solace:compileJava'
source project(':sdks:java:io:solace').layout.buildDirectory.dir('generated/sources/annotationProcessor/java/main')
dependsOn ':sdks:java:io:amazon-web-services2:compileJava'
source project(':sdks:java:io:amazon-web-services2').layout.buildDirectory.dir('generated/sources/annotationProcessor/java/main')
doLast {
File myFile = new File(layout.buildDirectory.dir("docs/javadoc/index.html").get().toString())
// Because we set failOnError false, Check if the doc successfully generated
if (!myFile.exists()) {
throw new GradleException("Javadoc not generated. Check logs for errors")
}
}
}
View on GitHub (pinned to 12126d8942)