I need help with the ojdbc driver to connect to Oracle,
I already have it added in the Classpath but I get the error not found.
This is the error that is presented in my gradle project: No suitable driver found for jdbc:oracle:thin:
I need help with the ojdbc driver to connect to Oracle,
I already have it added in the Classpath but I get the error not found.
This is the error that is presented in my gradle project: No suitable driver found for jdbc:oracle:thin:
You really need to provide more information if you expect any help.
Noone here can guess what is wrong.
How did you “added in the Classpath” for example?
And when you do what you get that error?
I added it in the classpath that appears in my Netbeans IDE, in the Tools / Libraries option, I created a new library called ojdbc and in it I added my ojdbc driver.
Also from my Gradle project file called build.gradle I added the following line of code in the dependencies part: “implementation fileTree(dir: ‘lib’, include: ‘ojdbc8.jar’)”
You missed the last question.
I don’t understand what you mean
What I mean is this:
What I’m trying to do is to be able to perform an insert from gradle to Oracle, but for some reason the project doesn’t want to recognize the ojdbc driver or maybe I’m the one adding it wrong, but I previously said how I’m placing it
But you still did not answer my question.
What exactly do you do where to get the error message you mentioned.
Do you kick off a Gradle build? Do you klick something in Netbeans? …?
What I do is run the project from netbeans, in the Run Project option
Then I would recommend trying to run from Gradle and check whether it works there as expected first.
Especially, as this is a Gradle community forum.
If it works as expected from Gradle, but does not synchronize properly into Netbeans, I guess it is more a Netbeans question.
Maybe someone else knows something, but I don’t use Netbeans.
NetBeans Gradle dev here.
Please right click on the project, select the project properties, then the Sources, and then the runtime classpath for the main sourceset. If you configured Gradle well, you shall be able ot see the Oracle JDBC driver there. If not you are doing something wrong, we need more info then.
Hello!
I did what he told me, I went to the properties of my project, in the source and runtime part and my ojdbc driver does not appear there.
If it doesn’t appear there, does it mean that it is configured correctly?
As he said the opposite, I’d guess no.