How to Exclude or Overwrite Specific JARs in Databricks Jars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2025 06:36 AM
Spark Version in Databricks 15.5 LTS: The runtime includes Apache Spark 3.5.x, which defines the SparkListenerApplicationEnd constructor as:
public SparkListenerApplicationEnd(long time)This constructor takes a single long parameter.
Conflicting Spark Library in Databricks: The error arises due to a conflicting library: ----ws_3_5--core--core-hive-2.3__hadoop-3.2_2.12_deploy.jar. This library includes a different version of the SparkListenerApplicationEnd class, which defines the constructor as:
public SparkListenerApplicationEnd(long time, scala.Option<Object> exitCode)This is method is present Spark 4.0.0-preview2 version.
Impact: At runtime, the JVM attempts to use the single-parameter constructor (<init>(J)V) but fails because the conflicting library expects the two-parameter version. This mismatch leads to the NoSuchMethodError.
How can I exclude or overwrite a specific JAR file, ws_3_5--core--core-hive-2.3__hadoop-3.2_2.12_deploy.jar, from Databricks compute dependencies when launching a Databricks compute cluster.