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:
Compiling metabase.driver.oracle
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 java.net.URLClassLoader/findClass (URLClassLoader.java:382).
oracle.jdbc.OracleConnection
Full report at:
/tmp/clojure-6946041199944006923.edn
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
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/
@shrike71
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.
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
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:
@shrike71
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: