DB2Test.db2Insert CALL!!
newInstance AFTER!
DB2Test.db2Insert getInstance SUCCESS!!
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getConnection(Unknown
Source)
at java.sql.DriverManager.getConnection(Unknown
Source)
at DB2Test_2.db2Insert(DB2Test_2.java:34)
at DB2Test_2.main(DB2Test_2.java:15)
--------------------------------------------------source---------------------
import java.sql.*;
import java.util.*;
//import COM.ibm.db2.jdbc.app.DB2Driver;
public class DB2Test_2
{
public static void main(String a[]) {
DB2Test_2 dt = new DB2Test_2();
dt.db2Insert();
}
public void db2Insert()
{
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
System.out.println("DB2Test.db2Insert CALL!!");
//Class.forName(ms_jdbcclass).newInstance();
Class.forName("COM.ibm.db2.jdbc.app.DB2Driver");
System.out.println("newInstance AFTER!");
System.out.println("DB2Test.db2Insert getInstance
SUCCESS!!");
conn =
DriverManager.getConnection("jdbc:db2://147.x.xxx.xxx:xxxxx/dbname",
"id", "pass");
System.out.println("DB2Test.db2Insert getConnection SUCCESS!!");
} catch(Exception e){
e.printStackTrace();
} finally {
}
}
}
-----------------------------------------------
이런 현상이 나타납니다..
DB2 8.1을 쓰고 있는데요..
지금 connection 문제가 해결되지 않고 있씁니다.
도와주세요...
AIX+DB2 8.1을 쓰고 있거든요..
jdbc드라이버는 구했다고 생각했눈데...
드라이버가 잘못된건가요??
version이 안맞는다거나...
조은을 좀 해주세요~~~
제 페스는..
.;C:\j2sdk1.4.2_04\lib\tools.jar;C:\j2sdk1.4.2_04\jre\lib\ext\PD.jar;C:\j2sdk1.4.2_04\jre\lib\ext\db2java.zip;C:\j2sdk1.4.2_04\jre\lib\ext\mm.mysql-2.0.4-bin.jar;C:\j2sdk1.4.2_04\jre\lib\ext\db2jcc.jar;C:\j2sdk1.4.2_04\jre\lib\ext\Common.jar;C:\j2sdk1.4.2_04\jre\lib\ext\db2fs.jar;C:\j2sdk1.4.2_04\jre\lib\ext\db2jcc_license_cisuz.jar;C:\j2sdk1.4.2_04\jre\lib\ext\db2jcc_license_cu.jar
|