|
Re: JDBC Connection for Java ( IBM Data Studio ) [message #957827 is a reply to message #957149] |
Thu, 25 October 2012 14:24 |
Eclipse User |
|
|
|
> - Everytime I run this . This error always pop out
> " java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver
> at java.lang.Class.forName(Class.java:139)
> at SMART.HelloWorld.main(HelloWorld.java:8) "
>
> They have said that my Class.forName has no source. Also if I needed to
> attach a source? what is it and where will I find it?
>
> Best Regards,
> G.L Hernandez
It basically says it can't find that class (i.e. ClassNotFoundException
means it can't find that class). That is the old obsolete type 2 DB2
driver. You should be using the now standard com.ibm.db2.jcc.DB2Driver
which is in the db2jcc.jar from DB2.
Rich
|
|
|
|
|
Re: JDBC Connection for Java ( IBM Data Studio ) [message #958006 is a reply to message #957908] |
Thu, 25 October 2012 17:16 |
Eclipse User |
|
|
|
It means it is not in your classpath. Make sure that the db2jcc.jar is
in your classpath for your launch configuration. (Using the com. not
COM. class name in Class.forName("...")
On 10/25/2012 11:41 AM, Bert Hernandez wrote:
> Still same error sir Rich . What should I do?
|
|
|
Powered by
FUDForum. Page generated in 0.03163 seconds