IGNITE-28893 Calcite. Declare joou runtime dependency explicitly#13372
Open
anton-vinogradov wants to merge 1 commit into
Open
IGNITE-28893 Calcite. Declare joou runtime dependency explicitly#13372anton-vinogradov wants to merge 1 commit into
anton-vinogradov wants to merge 1 commit into
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>
Contributor
|
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 ? |
Contributor
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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