Unable to Build Custom Impala Driver for Metabase v0.52 - Dependency & Classpath Issues - Stack Overflow

admin2025-04-17  4

I had try to use the jar files of this repo but there was a compatibility issue between the driver and metabase v0.52.6, so I decide to build a custom Impala driver for Metabase v0.52.6 inside a running Metabase Docker container, but the build process fails due to dependency resolution issues, Java module errors, and missing classes on the classpath.

Cloned the driver repository inside the container:

cd /tmp
git clone .git
cd metabase-impala

Modified project.clj to use the metabase v0.25.6 JAR:

(defproject metabase-driver/impala "0.1.0-SNAPSHOT"
  :min-lein-version "2.9.0"
  :dependencies [
    [org.clojure/clojure "1.11.1"]
    ;; Official Metabase Core dependency
    [metabase-core "0.52.6" :exclusions [org.clojure/clojure]]
    ;; Impala JDBC driver (manually installed)
    [com.cloudera.impala.jdbc/impala-jdbc "3.1.0"]
    ;; Required for Java 11+ compatibility
    [javax.xml.bind/jaxb-api "2.3.1"]
    [com.sun.xml.bind/jaxb-core "2.3.0.1"]
    [com.sun.xml.bind/jaxb-impl "2.3.1"]
  ]
  :repositories [
    ["central" "/"]
    ["clojars" "/"]
    ["metabase" "/"] ; Metabase's official repo
  ]
  :jvm-opts [
    "--add-modules=java.xml.bind",
    "--add-opens=java.base/java.lang=ALL-UNNAMED"
  ]
  :source-paths ["src"]
  :resource-paths ["resources"]
  :uberjar-name "impala.metabase-driver.jar")

Ran the build command

lein clean
lein uberjar

This what I get and I do search for the .52.6 it is available but unable to be downloaded!

I also, copied metabase-core.jar manually to /tmp/metabase-impala/lib/. but get this error

java.lang.module.FindException: Module java.xml.bind not found

then, I Switched Java versions inside the container to OpenJDK 8 (java -version now shows 1.8.0_432).

many errors related to decencies raised I tried to Manually added missing dependencies (java-time, honey/sql) but the errors persist.

  1. Has anyone successfully built a custom driver for Metabase v0.52 or even use the one in the mentioned repository withou any compatibility issues?

  2. How do I correctly reference metabase-core.jar when building inside the Metabase Docker image?

  3. Are there breaking changes in Metabase v0.52 that affect custom driver development?

Environment Details:

  • Metabase Version: v0.52.6

  • Java Version: OpenJDK 21 → Downgraded to OpenJDK 8

  • OS: Alpine Linux (Metabase Docker Image)

  • Build Tool: Leiningen 2.9.0

转载请注明原文地址:http://anycun.com/QandA/1744826111a88149.html