[Bug] All Flink 2.x SQL jobs fail with NoClassDefFoundError: FlinkTableInitializerV2
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- java
- Domain
- build-system
Research direction
Start in streampark-console-service/pom.xml and compare its compile dependency on streampark-flink-shims-base with the provided dependencies in the shims_flink-2.x modules. Build the distribution and run a Flink 2.x remote SQL application to verify the client resolves FlinkTableInitializerV2 and no longer throws NoClassDefFoundError; confirm Flink 1.x behavior remains unaffected.
Written by the indexing model from the issue text.
Description
Search before asking
- I had searched in the issues and found no similar issues referencing
FlinkTableInitializerV2/streampark-flink-shims-base-v2.
Java Version
Temurin 21.0.11 (console), built with Microsoft OpenJDK 11.0.28
Scala Version
2.12.x
StreamPark Version
3.0.0-SNAPSHOT (dev branch, commit 9ddda84c9)
Flink Version
2.2.1 (official binary distribution, standalone/remote cluster)
Deploy mode
remote
What happened
Every Flink 2.x SQL application fails while the client builds the JobGraph:
NoClassDefFoundError: org/apache/streampark/flink/core/FlinkTableInitializerV2
thrown from SqlClient.main() -> TableContext.<init>(). Flink 1.x SQL jobs are unaffected.
FlinkTableInitializerV2 lives in streampark-flink-shims-base-v2. streampark-console-service/pom.xml declares a normal compile dependency on the v1 module, streampark-flink-shims-base — so v1 ends up in the console's own lib/ — but declares no equivalent dependency on streampark-flink-shims-base-v2. The only references to v2 are the provided dependencies on streampark-flink-shims_flink-2.0/2.1/2.2/2.3, which exist to order the reactor for -am builds and do not put anything into the distribution.
The result is that TableContext (in each shims_flink-2.x module) can never resolve the v2 base class it depends on at runtime.
Most likely a line missed when 2.x support was added in e770d2e8e.
Error Exception
java.lang.NoClassDefFoundError: org/apache/streampark/flink/core/FlinkTableInitializerV2
at org.apache.streampark.flink.core.TableContext.<init>(...)
at org.apache.streampark.flink.cli.SqlClient$.main(...)
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- Dominant language
- Java
- Stars
- 4.3k
- Forks
- 1.1k
- Avg merge
- 13h 35m
- Merged PRs (30d)
- 2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/streampark
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
apache/streampark#4513 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
apache/streampark#4489 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
apache/streampark#4510 ·
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
apache/streampark#4508 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
apache/streampark#4495 ·
All issues in apache/streampark
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100