Gabriel Vellasq... · Feb 1, 2022

How to use Cache JDBC in a Gradle project (Java)?

I am using a Gradle Project for testing APIs, but I need to connect to the database.

I already put this on the dependencies:

And I'm trying to use this way:

But I'm keep getting this error: java.lang.ClassNotFoundException: com.intersys.jdbc.CacheDriver  

Is there any place that I can put a JAR file? Because the project has no lib folder (I already tried to add it, but it doesn't work).

0 333
Discussion (6)2
Log in or sign up to continue

Add it like this:

dependencies {
    implementation files('/path/to/iris_jdbc.jar')

You have to look at grade documentation. And it will be something like this. it says, to look at libs folder for jar files, usually it only uses some remote repositories like maven central

repositories {
    flatDir {
        dirs 'libs'

Are you trying for the Cache driver, or the IRIS driver? I'm pretty sure the 3.0.0 jar you're using is an IRIS driver, and in that case, the driver is com.intersystems.jdbc.IRISDriver, not com.intersys.jdbc.CacheDriver (note that in that transition, the beginning of the package changed from com.intersys to com.intersystems.)

Hello, David.

I tried this, but the same error appears.