468,537 Members | 1,917 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,537 developers. It's quick & easy.

cannot load jdbc driver

sea
I have DB2 UDB Workgroup version 7.2 -- the JDBC-ODBC bridge loads
perfectly fine but when I try to use JDBC I get an error, copying and
pasting below. I added db2java.zip and db2jdbc.dll to both the
classpath and path variables, still no luck. Anyone have any ideas
please? Thank you very much!

java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver

at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:2 97)

at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:286)

at java.lang.ClassLoader.loadClass(ClassLoader.java:2 53)

at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:313)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:120)

at db2jdbc.DB2Appl.<clinit>(DB2Appl.java:41)

java.sql.SQLException: No suitable driver

at java.sql.DriverManager.getConnection(DriverManager .java:537)

at java.sql.DriverManager.getConnection(DriverManager .java:177)

at db2jdbc.DB2Appl.main(DB2Appl.java:65)
Nov 12 '05 #1
2 11340
Which Java SDK are you using? (The Application Building Guide tells you how
to use the batch jobs usejdbc1 and usejdbc2 to control the SDK; DB2 V7.2 has
two built-in SDKs, Java 1.1.8 and Java 1.2.2. In addition, you can install
additional SDKs of your own; although unsupported, people do it.)

You might get better results if you put a copy of db2java.zip in your JRE
extensions directory, assuming you can find it ;-) I have multiple JREs on
my machine and figuring out which one is being used isn't always easy. If
you can do it though, your problem may go away. For what it's worth, I
haven't found it necessary to put copies of db2jdbc.dll anywhere to make
programs work.

Rhino

"sea" <se*****@hotmail.com> wrote in message
news:f8**************************@posting.google.c om...
I have DB2 UDB Workgroup version 7.2 -- the JDBC-ODBC bridge loads
perfectly fine but when I try to use JDBC I get an error, copying and
pasting below. I added db2java.zip and db2jdbc.dll to both the
classpath and path variables, still no luck. Anyone have any ideas
please? Thank you very much!

java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver

at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:2 97)

at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:286)

at java.lang.ClassLoader.loadClass(ClassLoader.java:2 53)

at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:313)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:120)

at db2jdbc.DB2Appl.<clinit>(DB2Appl.java:41)

java.sql.SQLException: No suitable driver

at java.sql.DriverManager.getConnection(DriverManager .java:537)

at java.sql.DriverManager.getConnection(DriverManager .java:177)

at db2jdbc.DB2Appl.main(DB2Appl.java:65)

Nov 12 '05 #2
Which Java SDK are you using? (The Application Building Guide tells you how
to use the batch jobs usejdbc1 and usejdbc2 to control the SDK; DB2 V7.2 has
two built-in SDKs, Java 1.1.8 and Java 1.2.2. In addition, you can install
additional SDKs of your own; although unsupported, people do it.)

You might get better results if you put a copy of db2java.zip in your JRE
extensions directory, assuming you can find it ;-) I have multiple JREs on
my machine and figuring out which one is being used isn't always easy. If
you can do it though, your problem may go away. For what it's worth, I
haven't found it necessary to put copies of db2jdbc.dll anywhere to make
programs work.

Rhino

"sea" <se*****@hotmail.com> wrote in message
news:f8**************************@posting.google.c om...
I have DB2 UDB Workgroup version 7.2 -- the JDBC-ODBC bridge loads
perfectly fine but when I try to use JDBC I get an error, copying and
pasting below. I added db2java.zip and db2jdbc.dll to both the
classpath and path variables, still no luck. Anyone have any ideas
please? Thank you very much!

java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver

at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:2 97)

at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:286)

at java.lang.ClassLoader.loadClass(ClassLoader.java:2 53)

at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:313)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:120)

at db2jdbc.DB2Appl.<clinit>(DB2Appl.java:41)

java.sql.SQLException: No suitable driver

at java.sql.DriverManager.getConnection(DriverManager .java:537)

at java.sql.DriverManager.getConnection(DriverManager .java:177)

at db2jdbc.DB2Appl.main(DB2Appl.java:65)

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by sufia | last post: by
reply views Thread by JohnLH | last post: by
reply views Thread by sea | last post: by
3 posts views Thread by r_stringer66 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.