when executing the IsqlApp class I'm having a ClassNotFoundException. According to me the file should not be looking for that driver but the one in the jconn4.jar (I installed Jconnect7) How can I solve this problem? Unexpected exception : java.lang.ClassNotFoundException: com.sybase.jdbc.SybDriv er java.lang.ClassNotFoundException: com.sybase.jdbc.SybDriver at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at IsqlApp.doIsql(IsqlApp.java:86) at IsqlApp.main(IsqlApp.java:58) asked 17 Jul '12, 05:39 michaelvanwy... Breck Carter |
You have the wrong classname being loaded by your JDBC code for jConnect 7.0. See: http://dcx.sybase.com/index.html#1201/en/dbprogramming/jconnect-using-jdbxextra.html The jConnect JDBC driver The classes in jConnect are all in
Loading the jConnect driver Ensure that the jConnect driver is in your class file path. The driver file jconn4.jar is located in the classes subdirectory of your jConnect installation.
The jConnect driver takes advantage of the new automatic JDBC driver registration. The driver is automatically loaded at execution startup when it is in the class file path. If you are using JDBC 4.0, you should note that you no longer are required to call answered 18 Jul '12, 15:13 Jeff Albion |