I'm getting the following error: ClassNotFoundException
java.lang.ClassNotFoundException: com.oracle.ojbdc6-11.2.0.1.0
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at uk.ac.ebi.mydas.examples.Conn.main(Conn.java:23)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
On my intelliJ IDE I'm pretty sure I've set the dependencies properly on Maven: because on my External Libraries Folder, there's a "Maven: com.oracle:ojdbc6:11.2.0.1.0" package listed.
I'm assuming there's a problem with my code not being able address the class properly.
try {
Class.forName("com.oracle.ojbdc6");
}
I realize that the jdbc drivers are not in the Maven repo, so I had to download it directly from the oracle website (correct version number) and load it to my library. I then added the pom.xml dependency successfully.
Finally, here's my POM.xml:
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.1.0</version>
</dependency>
Thanks!
EDIT:
Problem still occurs despite class OracleDriver being addressed.
EDIT2:
Here's a look into my module/dependencies setup on InnteliJ