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).
Add it like this:
dependencies { implementation files('/path/to/iris_jdbc.jar') }
It didn't work :(
The same error appears.
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
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.
Try looking at this https://github.com/intersystems-community/iris-driver-distribution
Even though the driver is listed in maven repos it doesn't download. You need to [manually] include the library in your project.