Troubleshooting
Quick fixes for the issues you’re most likely to hit. Run with -v first — most failures explain themselves in the verbose logs.
Reference table
Section titled “Reference table”| Symptom | Likely cause | Fix |
|---|---|---|
java: command not found | No JDK on PATH | Install Java 11+ and add it to PATH (see Installation). |
Cannot find symbol type X / unresolved types | Dependencies not downloaded | Let codeanalyzer build (don’t use --no-build on an uncompiled project), or ensure dependencies are resolvable. Use --no-clean-dependencies to inspect what was fetched. |
call_graph is empty | No entry point for WALA to anchor on | Verify the project has a main(String[]) or a recognized framework entry point. |
| Legacy import schema error | Old analysis.json read by a new JAR | Regenerate analysis.json with codeanalyzer 2.3.7+ (see below). |
| Build fails during level-2 analysis | Project doesn’t build with the default command | Pass a working -b "<cmd>", or pre-build and use --no-build. |
| Native binary throws, JAR doesn’t | Stale reflect-config.json | Regenerate native-image config (see below). |
analysis.json truncated / corrupt | Process killed or out of disk | Check disk space and re-run; ensure the run completes. |
Empty call graph
Section titled “Empty call graph”WALA traverses the call graph outward from entry points. If none are found, the graph can be empty even though the symbol table is complete.
- Confirm the project actually has an entry point — a
main(String[])or one of the supported framework patterns. - Confirm the project built. WALA needs compiled classes; if the build silently failed, there’s nothing to analyze. Re-run with
-vand check the build log. - If you used
--no-build, make sure the compiled output is actually present and current.
Unresolved types
Section titled “Unresolved types”Symbol resolution depends on library dependencies being available. If types from third-party libraries show up as simple (unqualified) names:
- Don’t run
--no-buildon a project that isn’t already built — dependency download is part of the normal flow. - Inspect what was fetched by adding
--no-clean-dependenciesand looking intarget/_library_dependencies/(Maven) orbuild/_library_dependencies/(Gradle). - For multi-module projects, point
-fat the reactor rootpom.xml/build.gradle. See Build integration.
Legacy import schema
Section titled “Legacy import schema”When merging incremental updates into an existing analysis.json, you may see:
Existing analysis.json uses legacy import schema (imports as strings). Regenerate analysis with codeanalyzer 2.3.7 or newer.
Older analyzers emitted imports as bare strings; from 2.3.7 they are structured objects ({ path, is_static, is_wildcard }). The merge guard refuses to mix the two. Fix: delete the old analysis.json and regenerate it with a current JAR before re-running incremental updates.
Native-image exceptions
Section titled “Native-image exceptions”If the GraalVM native binary throws random exceptions that java -jar does not, the reflection config is likely out of date. Regenerate it with the native-image agent and rebuild:
./gradlew fatJarjava -agentlib:native-image-agent=config-output-dir=src/main/resources/META-INF/native-image-config \ -jar build/libs/codeanalyzer-2.3.7.jar -i <sample-project> -a 2 -v./gradlew nativeCompile