Connection to Oracle failed if launched with "yarn dev"

Hi,

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

I setup my environement of metabase.

  1. Working scenario:

I ran ./bin/build.sh 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 oracle.net.nt.Clock, connect lapse 1 ms., Authentication lapse 0 ms.
[backend] https://docs.oracle.com/error-help/db/ora-17002/
[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 java.io.IOException,
[backend]    :error "java.lang.NoClassDefFoundError: Could not initialize class oracle.net.nt.Clock",
[backend]    :stacktrace
[backend]    ["oracle.net.ns.NSProtocolNIO.endWrite(NSProtocolNIO.java:1381)"
[backend]     "oracle.net.ns.NIOPacket.writeToSocketChannel(NIOPacket.java:387)"
[backend]     "oracle.net.ns.NIOConnectPacket.writeToSocketChannel(NIOConnectPacket.java:267)"
[backend]     "oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:197)"
[backend]     "oracle.net.ns.NSProtocol.connect(NSProtocol.java:331)"
[backend]     "oracle.jdbc.driver.T4CConnection.connectNetworkSessionProtocol(T4CConnection.java:2947)"
[backend]     "oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:910)"
[backend]     "oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:1126)"
[backend]     "oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:104)"
[backend]     "oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:825)"
[backend]     "oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:651)"
[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 java.io.IOException,
[backend]    :error "java.lang.NoClassDefFoundError: Could not initialize class oracle.net.nt.Clock, connect lapse 1 ms.",
[backend]    :stacktrace
[backend]    ["oracle.net.ns.NSProtocolNIO.negotiateConnection(NSProtocolNIO.java:262)"
[backend]     "oracle.net.ns.NSProtocol.connect(NSProtocol.java:331)"
[backend]     "oracle.jdbc.driver.T4CConnection.connectNetworkSessionProtocol(T4CConnection.java:2947)"

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