String driver = "org.postgresql.Driver";
String url = "jdbc:postgresql://58.227.54.238:5432/groupware";
String user = "postgres";
String pw1 = "보안상";
Connection con = null;
try{
System.out.println("con1 : "+driver);
Class.forName(driver); <---------------------------------- 드라이버를 찾지 못해영; 패스도 걸었고 다했는데도 왜그런지 모르겠습니다.
System.out.println("con2");
con = DriverManager.getConnection(url,user,pw1);
}catch(Exception e){
System.out.println("con err : "+e);
}
int i = 0;
System.out.println("ok!!!1");
// DbCon dbcon = new DbCon();
System.out.println("ok!!!2");
PreparedStatement pstmt = null;
// Connection con = null;
String query = null;
ResultSet rs = null;
System.out.println("ok!!!3");
query = "SELECT * FROM employee where emp_id = ?";
try{
System.out.println("ok!!!4");
// con = dbcon.getConnection();
System.out.println("ok!!!5");
pstmt = con.prepareStatement(query);
System.out.println("ok!!!6");
pstmt.setString(1,id);
System.out.println("ok!!!7");
rs = pstmt.executeQuery();
System.out.println("ok!!!8");
위의 위치에서classnotfoundException이 자꾸뜨네염 ㅠㅠ
rmi서버를 이용해서 짜구 있구여 위의 에러로 인해 디비에 접근이 안됩니다. |