database.sarang.net
UserID
Passwd
Database
DBMS
MySQL
ㆍPostgreSQL
Firebird
Oracle
Informix
Sybase
MS-SQL
DB2
Cache
CUBRID
LDAP
ALTIBASE
Tibero
DB 문서들
스터디
Community
공지사항
자유게시판
구인|구직
DSN 갤러리
도움주신분들
Admin
운영게시판
최근게시물
PostgreSQL Q&A 7534 게시물 읽기
No. 7534
자바 rmi서버를 이용하는데 디비에 접근하지 못합니다.
작성자
김치원(gikimyi)
작성일
2008-10-07 09:42
조회수
6,309

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서버를 이용해서 짜구 있구여 위의 에러로 인해 디비에 접근이 안됩니다.

[Top]
No.
제목
작성자
작성일
조회
7537insert & import 속도 [6]
박성식
2008-10-08
7207
7536[답변 감사합니다]Trigger관련 다시 정리해서 질문드립니다. [5]
김상희
2008-10-08
6663
7535trigger함수 관련 질문입니다. [2]
김상희
2008-10-08
6118
7534자바 rmi서버를 이용하는데 디비에 접근하지 못합니다.
김치원
2008-10-07
6309
7533로그인문제입니다 [1]
변승찬
2008-10-06
6287
7532insert만 하는 DB에 대한 튜닝 조언 부탁드립니다. [6]
김대청
2008-10-06
7033
7531postgresql과 톰캣 연동하는 방법
하짐
2008-10-03
6277
Valid XHTML 1.0!
All about the DATABASE... Copyleft 1999-2024 DSN, All rights reserved.
작업시간: 0.024초, 이곳 서비스는
	PostgreSQL v16.2로 자료를 관리합니다