Background Image
조회 수 28036 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Attempt to access a closed ResultSet(PreparedStatement) 과 같은 오류는 일반적으로
1.        질의의 사용 후 결과를 가져와 사용 중 commit/rollback을 수행 후 결과를 계속 가져오려 하는 경우 transaction이 종료되어 결과 셑이 닫혀버린 경우
2.        구조상 한 클라이언트에서 서버로의 질의 수행 후 특정시간(SESSION TIME OUT)동안 서버로의 요청이 없어 서버단의 미들웨어(Broker)에서 연결을 강제 종료 시킨 경우
위 2가지의 경우 발생할 수 있습니다.

1의 경우는 주로 한 개의 ResultSet이 close()되기 전에 다른 ResultSet을 생성할 경우 앞의 ResultSet은 autoCommit되어 결과 셑이 닫혀버리면서 발생하는 데 이와 같이 동시에 여러 개의 ResultSet이 필요한 경우엔 autoCommit을 false로 설정해야 합니다.
예를 들면
try {
conn.setAutoCommit(false);
query1 = "SELECT id FROM sample1";
pstmt1 = conn.prepareStatement(query1);
query2 = "SELECT result FROM sample2 WHERE id=?";
pstmt2 = conn.prepareStatement(query2);

rs1 = pstmt1.executeQuery();
while(rs1.next()){
psmt2.setString(1, rs1.getString("id"));
rs2 = pstmt2.executeQuery();
result = rs2.getString("result");
}
conn.commit();

} catch ( Exception e ) {
conn.rollback();
} finally {
if ( conn != null ) conn.close();
}

와 같이 상단에서 autoCommit을 false로 설정하고 마지막에 commit()처리를 해주셔야 합니다. 물론 exception이 발생하면 rollback()처리도 해주셔야 합니다.

2의 경우에는 큐브리드 브로커의 환경설정 중 SESSION_TIMEOUT 설정 값을 크게 늘려주는 방법으로 해결할 수 있습니다.

  1. 'Has been interrupted.' CUBRIDException 발생

    Date2016.01.07 Category운영관리 By주현 Views6595
    Read More
  2. 2008.11.18. 최신 우편번호부 with CUBRID

    Date2009.03.17 Category기타 ByPrototype Views14482
    Read More
  3. 32bit JRE 환경에서 64bit CUBRID Tool 사용

    Date2015.06.30 CategoryCUBRID 매니저 By손승일 Views7190
    Read More
  4. 32bit 리눅스 환경에서 php 모듈 빌드가 되지 않을 경우

    Date2009.03.31 Category기타 ByPrototype Views17179
    Read More
  5. 64bit OS 에서 사용가능한가요?

    Date2008.11.21 Category운영관리 Byadmin Views17415
    Read More
  6. 64비트 윈도우환경에서 32비트 ODBC 사용하기

    Date2009.12.09 Category운영관리 ByPrototype Views22678
    Read More
  7. 9.2 버전에서 복제 재구축(ha_make_slavedb.sh) 스크립트를 사용하려면 수정해야 할 부분

    Date2013.10.24 Category운영관리 Bybrightest Views12231
    Read More
  8. Attempt to access a closed ResultSet(PreparedStatement) 오류

    Date2008.11.21 Category응용개발 Byadmin Views28036
    Read More
  9. A테이블의 다수의 컬럼을 B테이블로 UPDATE 하는 SQL

    Date2015.05.07 Category질의작성 By김승훈 Views7416
    Read More
  10. Broker_log_top 결과 분석 방법

    Date2009.06.18 Category운영관리 Bycubebridge Views11560
    Read More
  11. CM(CUBRID Manager)을 이용하여 행정표준코드시스템의 기관코드 가져오기

    Date2015.12.28 Category마이그레이션 By권호일 Views6329
    Read More
  12. CMT를 이용하여 원본 특정 테이블의 일부 데이터만 가져와 대상 테이블에 넣기

    Date2016.01.28 Category마이그레이션 By엄기호 Views4558
    Read More
  13. CM이 아닌 서버(console)상의 쿼리 결과값을 저장하는 방법

    Date2009.05.19 Category운영관리 Bycubebridge Views20200
    Read More
  14. CONNECT BY 절 포함 질의 튜닝 예제

    Date2017.02.28 Category질의작성 By박세훈 Views9771
    Read More
  15. CSQL 로 쿼리 플랜을 볼때 주의해야 할 점

    Date2009.06.30 Category운영관리 ByPrototype Views12382
    Read More
  16. CSQL 에서 한글을 입력하는 방법

    Date2009.04.01 Category운영관리 ByPrototype Views19350
    Read More
  17. CUBRID 2008 R2.0 RPM 설치후 PHP모듈 로딩에 실패할 경우

    Date2009.12.10 Category운영관리 ByPrototype Views14918
    Read More
  18. CUBRID 2008 삭제시 제어판에서 삭제되지 않을시 해결법

    Date2009.04.13 Category운영관리 Byseongjoon Views15892
    Read More
  19. CUBRID 2008 삭제시 주의사항

    Date2009.04.01 Category운영관리 Byseongjoon Views15288
    Read More
  20. CUBRID 2008 설치시 주의사항

    Date2009.04.01 Category운영관리 Byseongjoon Views17503
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 14 Next
/ 14

Contact Cubrid

대표전화 070-4077-2110 / 기술문의 070-4077-2113 / 영업문의 070-4077-2112 / Email. contact_at_cubrid.com
Contact Sales