Are you loading the driver directly or using a data source? If the former, does your driver load successfully? Is the driver on your classpath? The following is the code that I use to load a driver to connect to DB2 v7.1 for NT. I use the DSN name in the url but it matches my db and alias names as well. Connection con1 = null; 
String url = "jdbc:db2:MyDSN"; 
String user = "myuser"; 
String pwd = "mypwd"; 
try { 
// load IBM driver 
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); 
} catch (ClassNotFoundException e) { 
System.out.println( "Class not found: " + e.getMessage() ); 
System.exit(-1); 
} try { 
// connect to the database 
con1 = DriverManager.getConnection(url, user, pwd); 
} catch (SQLException ex) {}