Question Gabriel Vellasques Tureck · 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).

Comments

Eduard Lebedyuk · Feb 1, 2022

Add it like this:

dependencies {
    implementation files('/path/to/iris_jdbc.jar')
}
0
Dmitry Maslennikov · Feb 1, 2022

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'
    }
}
0
David Hockenbroch · Feb 1, 2022

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.)

0