Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » db2 express C connection
db2 express C connection [message #25065] Sun, 07 January 2007 10:30 Go to next message
Eclipse UserFriend
Originally posted by: prog.kv.aon.at

I have got eclipse 3.2.1, DB2 DWB, and DB2 express C installed. With the
connection wizard the connection to the database xxdat can be set up, but
when I try to get a connection by using
Class.forName("com.ibm.db2.jcc.DB2Driver"); it does not work.

as classpathvariables i configured:

c:\Programme\IBM\DWB\V9.1\dwb_prod\eclipse\plugins\com.ibm.d atatools.db2_1.0.0\driver\db2jcc.jar;

c:\Programme\IBM\DWB\V9.1\dwb_prod\eclipse\plugins\com.ibm.d atatools.db2_1.0.0\driver\db2jcc_license_cisuz.jar

when I execute

Class.forName("com.ibm.db2.jcc.DB2Driver");
String urlLWn = "jdbc:odbc:xxdat";
Connection conXXdat = DriverManager.getConnection(urlLWn);

the exception "java.lang.ClassNotFoundException:
com.ibm.db2.jcc.DB2Driver" is thrown.

Can someone help?
Thanks for any hints,
Karl-Heinz
Re: db2 express C connection [message #25910 is a reply to message #25065] Tue, 23 January 2007 21:55 Go to previous message
Eclipse UserFriend
Originally posted by: ldunnel.us.ibm.com

The connection wizard explicitly loads the jars into a classloader. For
example,

ClassLoader myLoader = new URLClassLoader(urls,
getClass().getClassLoader());
(Driver) myLoader.loadClass("com.ibm.db2.jcc.DB2Driver").newInstance();

Then you can use the driver to connect.
Re: db2 express C connection [message #584151 is a reply to message #25065] Tue, 23 January 2007 21:55 Go to previous message
Larry Dunnell is currently offline Larry DunnellFriend
Messages: 19
Registered: July 2009
Junior Member
The connection wizard explicitly loads the jars into a classloader. For
example,

ClassLoader myLoader = new URLClassLoader(urls,
getClass().getClassLoader());
(Driver) myLoader.loadClass("com.ibm.db2.jcc.DB2Driver").newInstance();

Then you can use the driver to connect.
Previous Topic:DTP 1.0: Connection profiles don't get saved between Eclipse sessions?
Next Topic:Hsqldb in DTP
Goto Forum:
  


Current Time: Fri Apr 19 01:17:16 GMT 2024

Powered by FUDForum. Page generated in 0.02190 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top