IGNITE-28893 Calcite. Declare joou runtime dependency explicitly#13372
Conversation
calcite-core 1.42 added org.jooq:joou-java-6 as a runtime dependency, but only direct dependencies are copied into target/libs, which both the release package and the exploded test classpath are assembled from. Without it a node with the Calcite engine halts the JVM on NoClassDefFoundError at startup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
I see, it really appended in last versions, but currently it functional is not used (i believe in java), plz give me a clue why it work`s perfectly well for java ? |
|
Ignite PR Checker verdict · RunAll build 9210086 · 147 suites ran, 0 reused 🔍 1 suite(s) ran fewer tests than on master (tests that never ran can't fail):
✅ No test blockers otherwise; 29 pre-existing/flaky filtered out. |
|
@zstan You're right that Ignite's own Java code doesn't call these methods — but Calcite does, at engine init. In The node dies while building the engine, not while running a query. Stack (reproduced locally without joou on the classpath):
Why Java suites are green: Surefire builds its classpath from the full transitive Maven graph, where |
|
@zstan And here is the same failure taken from CI on current master (no local setup involved): build 9209640, Same frames as the local repro. (The missing class name varies between runs — The JVM halt kills the hosting |
Symptom
The
Platform C++ CMakesuites report 595 tests instead of 1046, with zero failures. The TeamCity "test count dropped" guard turns the suite red without a single failed test, which in turn poisons PR verdicts. Most PRs do not see it because their chains reuse older C++ results.Root cause
The Calcite upgrade from 1.40 to 1.42 changed only the version properties in
modules/calcite/pom.xml. Butcalcite-core1.42 declares a new runtime dependency,org.jooq:joou-java-6:0.9.5, which 1.40 did not have, and it was not added to the module's dependency list.That matters because the
copy-libsexecution ofmaven-dependency-plugininparent/pom.xmlcopies only direct dependencies intotarget/libs(excludeTransitiveistrue). This is exactly whymodules/calcite/pom.xmlalready declares Calcite's runtime dependencies explicitly — guava, failureaccess, janino, avatica-core, jackson, json-path, reflections.joouwas not declared, so it never lands inmodules/calcite/target/libs.Two consumers are built from
target/libs:assembly/dependencies-apache-ignite.xmlmaps each optional module'starget/libsintooptional/${module.artifactId}, solibs/optional/ignite-calciteships without joou.CreateIgniteHomeClasspath()inmodules/platforms/cpp/core/src/jni/os/{linux,win}/utils.cpp, which appends each module'starget/libsjars. This is the classpath the C++ tests boot their JVM node with.A node with the Calcite engine enabled therefore dies during startup:
StopNodeOrHaltFailureHandlerhalts the JVM from inside the hosting process, so the C++ test binary that started the node is killed along with it and its remaining tests never run.The only C++ configuration that enables the Calcite engine is
odbc-test/config/queries-default.xml. That is why exactly one binary dies: the ODBC one, at its first node-starting test (ConnectionTestSuite: TestConnectionRestore, which bootsqueries-test.xml). The suite's 595 tests break down as core-test 458 + thin-client-test 130 + odbc-test 7.Java suites are unaffected because Surefire resolves the full transitive classpath from Maven — only the
target/libs-based layouts are broken.Fix
Declare
org.jooq:joou-java-6explicitly inmodules/calcite/pom.xml, so it is copied intotarget/libsand reaches both the release package and the exploded test classpath.What was verified vs. inferred
Verified locally:
calcite-core1.40.0 has no joou; 1.42.0 declaresjoou-java-6:0.9.5withscope=runtime.modules/calcite/target/libscontains 19 jars, joou absent; after the fix 20 jars,joou-java-6-0.9.5.jarpresent.queries-test.xmlon an exploded classpath without joou reproducesNoClassDefFoundError: org/joou/ULong→ critical system error → JVM halt (exit 130). With joou on the classpath the same node starts normally.Verified from the CI build: the failing build's test list (core-test 458, thin-client-test 130, odbc-test 7) and the build log, which contains the
NoClassDefFoundError: org/joou/UBytestack and the subsequent halt. (The class differs from the local run —UBytevsULong— because the first reflective touch of the missing library varies by code path; the library and the failure are the same.)Not verified: the C++ toolchain was not built locally, so the death of the boost binary itself was observed only in the CI log, not reproduced on my machine. Windows behaviour is inferred from the Linux run plus the identical packaging path.
Out of scope: 26 further transitive runtime dependencies of calcite-core (proj4j, avatica remote HTTP, snakeyaml, …) are likewise absent from
target/libs. They have always been absent and are not reached at runtime; only joou became newly required. Worth keeping in mind on the next Calcite/Avatica bump.cc @zstan (Calcite upgrade), @timoninmaxim (the
target/libs/ exploded-classpath machinery)🤖 Generated with Claude Code