Problems with Oracle driver when building a docker image from git clone [Metabase 0.33, 0.33.4]


I’m encountering an issue where the clojure/java build process is failing to find the ojdbc8.jar file when building the oracle portion of the drivers.
I know from your documentation that this needs to be obtained separately from Oracle, which I have done. I have also tried to COPY it into different locations that I thought might be on the classpath via the Dockerfile, to no avail. Can somebody provide some direction as to how this needs to be included/moved via the Dockerfile? Otherwise, can somebody indicate how to disable Oracle support altogether in the build, we don’t really need it.

The output of the final error is below:

10-22 16:32:12 DEBUG plugins.classloader :: Using NEWLY CREATED classloader as shared context classloader: clojure.lang.DynamicClassLoader@1bb15351
10-22 16:32:12 DEBUG plugins.classloader :: Setting current thread context classloader to shared classloader clojure.lang.DynamicClassLoader@1bb15351...
Syntax error macroexpanding at (oracle.clj:1:1).
Execution error (ClassNotFoundException) at (

Full report at:
Compilation failed: Subprocess failed
Error: could not find /app/source/modules/drivers/oracle/target/uberjar/oracle.metabase-driver.jar. Build failed.
Failed to build driver oracle.
The command '/bin/sh -c bin/build' returned a non-zero code: 255

Hi @shrike71
Please post the output of:

java -version
nodejs --version
lein --version
yarn --version
lsb_release -d
git log -1 --format="commit %H"
git status | head -1

The file ojdbc8.jar is not needed to build the driver. But you need it as dependent of the driver if you want to use the driver.
If you don’t need the driver, then just remove driver from ./modules/drivers/

ubuntu@ubuntu18:~/projects/mb/0.33.4/metabase$ java -version
java version "1.8.0_201"
Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

ubuntu@ubuntu18:~/projects/mb/0.33.4/metabase$ nodejs --version

ubuntu@ubuntu18:~/projects/mb/0.33.4/metabase$ lein --version
Warning: implicit hook found: lein-environ.plugin/hooks
Hooks are deprecated and will be removed in a future version.
Leiningen 2.9.1 on Java 1.8.0_201 Java HotSpot(TM) 64-Bit Server VM

ubuntu@ubuntu18:~/projects/mb/0.33.4/metabase$ yarn --version

ubuntu@ubuntu18:~/projects/mb/0.33.4/metabase$ lsb_release -d
Description:    Ubuntu 18.04.1 LTS

git log -1 --format="commit %H"
commit 77ae8d164152ac782dacb3f3f3f1ac5ac71eb4b8

ubuntu@ubuntu18:~/projects/mb/0.33.4/metabase$ git status | head -1
On branch master

Slightly old Java and Yarn and Node, but should still work without any issues.
Which command are you using when building? It looks like you’re trying to compile inside Docker.


docker build -t "metabase:v0" .

We’re not building inside docker, but we use developer specific virtualbox VMs and Vagrant. Each one has the community docker executive and docker-compose installed

Updating java could solve your problem.

I’m currently using Oracle driver with docker but haven’t experienced these kinds of problems.
It is a little tough to configure metabase with docker and Oracle drivers. I would suggest using some pre-made scenarios.
In my case I don’t use ojdbc8.jar (only ojdbc7.jar) inside the container and my Java is also up-to-date.

Anyway, as you’re still in dev environment, try using this:

If you use ./Dockerfile, then you are building Metabase inside the Docker image and not using your versions of Java/Yarn/Node/Lein. Check the file to see what it does.
If you want to build a Docker image, then use this script - or check the file to see what it does:

./bin/docker/ source release-0.33.x