Skip to content

java.lang.NoClassDefFoundError on Spark local mode using --conf spark.jars#1047

Merged
richox merged 1 commit intoapache:masterfrom
XorSum:class-loader
Jul 20, 2025
Merged

java.lang.NoClassDefFoundError on Spark local mode using --conf spark.jars#1047
richox merged 1 commit intoapache:masterfrom
XorSum:class-loader

Conversation

@XorSum
Copy link
Contributor

@XorSum XorSum commented Jul 1, 2025

Which issue does this PR close?

Closes #1046

Rationale for this change

In Spark local mode, the jar packages submitted via --conf spark.jars are loaded by Spark's childfirst class loader rather than the system class loader.

What changes are included in this PR?

use contextClassLoader instead of systemClassLoader

Are there any user-facing changes?

No

@richox richox merged commit 710068e into apache:master Jul 20, 2025
1231 of 1237 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

java.lang.NoClassDefFoundError on Spark local mode using --conf spark.jars

2 participants