Connection to Oracle failed if launched with "yarn dev"


I'm facing a strange behaviour preventing me trying to contribute.

I setup my environement of metabase.

  1. Working scenario:

I ran ./bin/ and got the uberjar (from 0.48.6 tags for instance).
I added a file plugins/ojdbc8.jar next to metabase.jar and i ran java -jar metabase.jar

Everything is working flawless here.

  1. Scenario with my issue:

I put the file ojdbc8.jar in the folder plugins at the root of the project and ran yarn dev
Everything seems to be fine but the oracle connection. it isn't working anymore anb it is generating some errors in the backend:

[backend] 2024-03-12 11:31:08,641 ERROR middleware.catch-exceptions :: Erreur lors du traitement de la requĂȘte : ORA-17002: I/O error: java.lang.NoClassDefFoundError: Could not initialize class, connect lapse 1 ms., Authentication lapse 0 ms.
[backend] {:database_id 2,
[backend]  :started_at #t "2024-03-12T11:30:37.463923+01:00[Europe/Paris]",
[backend]  :via
[backend]  [{:status :failed,
[backend]    :class,
[backend]    :error "java.lang.NoClassDefFoundError: Could not initialize class",
[backend]    :stacktrace
[backend]    [""
[backend]     ""
[backend]     ""
[backend]     ""
[backend]     ""
[backend]     "oracle.jdbc.driver.T4CConnection.connectNetworkSessionProtocol("
[backend]     "oracle.jdbc.driver.T4CConnection.logon("
[backend]     "oracle.jdbc.driver.PhysicalConnection.connect("
[backend]     "oracle.jdbc.driver.T4CDriverExtension.getConnection("
[backend]     "oracle.jdbc.driver.OracleDriver.connect("
[backend]     "oracle.jdbc.driver.OracleDriver.connect("
[backend]     "--> plugins.jdbc_proxy$proxy_driver$reify__108835.connect(jdbc_proxy.clj:37)"
[backend]     "connection_pool$proxy_data_source$reify__47649.getConnection(connection_pool.clj:29)"]}
[backend]   {:status :failed,
[backend]    :class,
[backend]    :error "java.lang.NoClassDefFoundError: Could not initialize class, connect lapse 1 ms.",
[backend]    :stacktrace
[backend]    [""
[backend]     ""
[backend]     "oracle.jdbc.driver.T4CConnection.connectNetworkSessionProtocol("

Why such a behaviour ? Is there anything i should set for my environment ?

  1. My setup:
  • Windows 10 Pro 22H2
  • WSL2 (Windows Subsystem For Linux)
  • Debian 11 Distribution
  • All the dependencies needed in Debian (java 11n node, clojure etc ...)

Every procedures above has been ran from the same terminal and metabase openned in chrome at localhost:3000

I will be so grateful to anyone who will hep me, i'm struggeling on this for more than a month now ....

Best regards

It seems i'm gonna answer myself but i finally found a solution.

Using the command clojure -M:run:drivers seems to had solve my connection issue.

Yarn dev was only using clojure -M:run.

I found this like very randmly, trying all kind of stuff ... It's sad that the documentation isn't more accurate about his.

Anyway, problem solved