Background Image

FORUM

조회 수 277 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

* 질문 등록 시 다음의 내용을 꼭 기입하여 주세요.
OS
Linux 64bit
CUBRID Ver.
10.1
CUBRID TOOL Ver.
10.1
응용 환경(API)
java, tomcat

* CUBRID 응용 오류, SQL 오류 또는 SQL 튜닝 관련된 문의는 반드시 다음의 내용을 추가해 주세요. 비밀글이나 비밀 댓글도 가능합니다.
* 저희가 상황을 이해하고, 재현이 가능해야 알 수 있는 문제들이 많습니다. 가능한 정보/정황들을 부탁합니다.
에러 내용 및 재현 방법 재현 가능한 Source와 SQL
관련 테이블(인덱스, 키정보 포함) 정보 CUBRID 홈 디렉토리 아래 log 디렉토리 압축


수고하십니다.

아래와 같은 오류가 간헐적으로 수향시간이 긴 query를 수행하는 경우에 발생합니다.

해결잭은 없는 건가요?

알려주시면 감사하겠습니다.


Caused by: cubrid.jdbc.driver.CUBRIDException: Attempt to access a closed Statement.
        at cubrid.jdbc.driver.CUBRIDStatement.checkIsOpen(CUBRIDStatement.java:1009) ~[JDBC-10.1.2.7694-cubrid.jar:?]
        at cubrid.jdbc.driver.CUBRIDStatement.getResultSet(CUBRIDStatement.java:285) ~[JDBC-10.1.2.7694-cubrid.jar:?]
        at core.log.impl.PreparedStatementLoggable.getResultSet(PreparedStatementLoggable.java:487) ~[log4sql.jar:?]
        at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source) ~[?:?]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
        at core.log.aop.handler.DaoInfo.doAround(DaoInfo.java:95) ~[log4sql.jar:?]
        at core.log.aop.reflection.profiler.AroundProfiler.invoke(AroundProfiler.java:19) ~[log4sql.jar:?]
        at com.sun.proxy.$Proxy281.getResultSet(Unknown Source) ~[?:?]
        at com.ibatis.sqlmap.engine.execution.SqlExecutor.getFirstResultSet(SqlExecutor.java:336) ~[ibatis-sqlmap-2.3.4.726.jar:?]
        at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:298) ~[ibatis-sqlmap-2.3.4.726.jar:?]
        at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:189) ~[ibatis-sqlmap-2.3.4.726.jar:?]
        at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221) ~[ibatis-sqlmap-2.3.4.726.jar:?]
        at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189) ~[ibatis-sqlmap-2.3.4.726.jar:?]
        at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139) ~[ibatis-sqlmap-2.3.4.726.jar:?]
        at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567) ~[ibatis-sqlmap-2.3.4.726.jar:?]
        at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:126) ~[ibatis-sqlmap-2.3.4.726.jar:?]
        at egovframework.rte.psl.orm.ibatis.SqlMapClientTemplate$4.doInSqlMapClient(SqlMapClientTemplate.java:315) ~[egovframework.rte.psl.dataaccess-3.5.0.jar:?]
        at egovframework.rte.psl.orm.ibatis.SqlMapClientTemplate$4.doInSqlMapClient(SqlMapClientTemplate.java:313) ~[egovframework.rte.psl.dataaccess-3.5.0.jar:?]
        at egovframework.rte.psl.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203) ~[egovframework.rte.psl.dataaccess-3.5.0.jar:?]
        at egovframework.rte.psl.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:313) ~[egovframework.rte.psl.dataaccess-3.5.0.jar:?]
        at egovframework.rte.psl.dataaccess.EgovAbstractDAO.list(EgovAbstractDAO.java:251) ~[egovframework.rte.psl.dataaccess-3.5.0.jar:?]
        at egov.cm.cor.ds.EgovIbatisAbstractDAO.list(EgovIbatisAbstractDAO.java:186) ~[kca-common-1.0.jar:?]
        at egov.cm.cor.ds.EgovIbatisAbstractDAO.list(EgovIbatisAbstractDAO.java:143) ~[kca-common-1.0.jar:?]
        at kr.kca.ri.prm.pr.dao.RiPrmPr02M01DAO.iListFcltyOutptData(RiPrmPr02M01DAO.java:723) ~[classes/:?]
        at kr.kca.ri.prm.pr.service.impl.RiPrmPr02M01ServiceImpl.iListFcltyOutptData(RiPrmPr02M01ServiceImpl.java:90) ~[classes/:?]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) ~[spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) ~[spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) ~[spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98) ~[spring-tx-4.0.9.RELEASE.jar:4.0.9.RELEASE]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262) ~[spring-tx-4.0.9.RELEASE.jar:4.0.9.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95) ~[spring-tx-4.0.9.RELEASE.jar:4.0.9.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) ~[spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
        at org.springframework.aop.aspectj.AspectJAfterThrowingAdvice.invoke(AspectJAfterThrowingAdvice.java:58) ~[spring-aop-4.0.9.RELEASE.jar:4.0.9.RELEASE]
        ... 56 more

  • ?
    큐브리드_김주현 2020.07.13 17:39
    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의 경우에는 큐브리드 브로커의 환경설정($CUBRID/conf/cubrid_broker.conf) 중 SESSION_TIMEOUT 설정 값을 크게 늘려주는 방법으로 해결할 수 있습니다.
    감사합니다.

  1. CUBRID 사용자를 위한 DBeaver 도구 출시 안내

    Date2024.04.23 Byadmin Views105
    read more
  2. SQLGate for CUBRID 영구 무료 라이선스 제공

    Date2020.04.09 Byadmin Views4471
    read more
  3. Archive log 관리 질문

    Date2013.07.16 Byjune2 Views9334
    Read More
  4. Attempt to access a closed Statement

    Date2020.07.09 By현수 Views277
    Read More
  5. Attempt to call a method related to scrollability of non-scrollable ResultSet. 오류 문의

    Date2011.07.28 Bycuins Views12568
    Read More
  6. Audit 테이블 따로 존재하나요?

    Date2019.07.01 ByJIRAN Views242
    Read More
  7. Auto Increment에 대한 질문입니다.

    Date2016.02.18 By너랑이마녀 Views8070
    Read More
  8. A트랜잭션에서 Update중인 row 를 B트랜잭션에서 Select

    Date2015.12.25 By큐불리드 Views6115
    Read More
  9. BIT형 데이터에 대한 where ... IN 쿼리

    Date2010.03.10 By소라게 Views10764
    Read More
  10. BLOB 데이터 select 질문

    Date2009.12.23 Byhyperhand Views12311
    Read More
  11. BLOB 타입 이미지를 JSP로 웹에 뿌려주려면 어떻게 해야하나요?

    Date2014.07.07 By아워나 Views15380
    Read More
  12. BLOB에 대한 자바 타입변환 문제..

    Date2013.01.28 Byㅇㅇ Views10099
    Read More
  13. BYTE 단위로 SUBSTRING 하는게 가능한가요?

    Date2020.07.01 Bymon Views849
    Read More
  14. BeginTrans 상태에서 검색 시 응답없음 발생

    Date2011.04.22 By까망이 Views14738
    Read More
  15. Broker log 에 start 만 찍히는건 어떤 현상인가요

    Date2010.08.24 By노스 Views9103
    Read More
  16. Broker 에러가 자주 납니다.

    Date2010.11.17 By아르게네스 Views7321
    Read More
  17. C# ADO.NET 이용했을떄 문제

    Date2017.04.14 By보람이 Views8221
    Read More
  18. C# WPF Dataset 연결시 외래키 자동 연결 안됨.

    Date2014.07.11 Bymoon Views9911
    Read More
  19. C# ole db 연동 오류 어떻게 해야 할지 조언 부탁 드립니다.

    Date2013.02.28 By배나와사마 Views15330
    Read More
  20. C#에서 ODBC연결시 에러

    Date2009.11.15 By용이 Views31853
    Read More
  21. C#에서 한글컬럼명이 깨지는 증상

    Date2013.11.05 By미르 Views19728
    Read More
  22. C++ Embedded SQL에서 호스트 변수로 클래스 데이터 선언 가능 여부 문의

    Date2012.04.20 By리겔 Views9983
    Read More
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 ... 200 Next
/ 200

Contact Cubrid

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