eGovFrame 표준프레임워크 포털

메뉴 건너띄기
상단메뉴 바로가기
본문 바로가기

이 누리집은 대한민국 공식 전자정부 누리집입니다.

본문 영역

적용 지원, FAQ, Q&A 게시판을 통해 기술 문제 해결을 지원합니다.

묻고 답하기

공통컴포넌트 적용시 에러
  • 작성자

    이*민

  • 작성일

    2012-12-21 11:43:20

  • 조회수

    1,949

  • 구분

    공통컴포넌트

  • 진행상태

    완료

질문

공통컴포넌트 가이드대로 따라하였고 MySQL과 connect하였습니다.

Run on Server 시 아래와 같은 문구가 화면에 나옵니다.
문제가 무엇인가요ㅠ 로그는 메모장에 복사하여 첨부합니다.

SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred in egovframework/sqlmap/rte/sample/EgovSample_Sample_SQL_mysql.xml. --- The error occurred while executing query. --- Check the SELECT /* ID id, NAME name, DESCRIPTION description, USE_YN useYn, REG_USER regUser */ ID, NAME, DESCRIPTION, USE_YN, REG_USER FROM SAMPLE WHERE 1=1 ORDER BY ID DESC limit ?, ? . --- Check the SQL Statement (preparation failed). --- Cause: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.); nested exception is com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in egovframework/sqlmap/rte/sample/EgovSample_Sample_SQL_mysql.xml. --- The error occurred while executing query. --- Check the SELECT /* ID id, NAME name, DESCRIPTION description, USE_YN useYn, REG_USER regUser */ ID, NAME, DESCRIPTION, USE_YN, REG_USER FROM SAMPLE WHERE 1=1 ORDER BY ID DESC limit ?, ? . --- Check the SQL Statement (preparation failed). --- Cause: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)

첨부파일
답변

안녕하세요.. 이주민님..

최종 원인은.. "Caused by: java.net.UnknownHostException: db2"입니다..

즉.. DB 서버 정보가 잘못되어 연결되지 않은 것입니다..

context-datasource.xml 상에 지정된.. JDBC URL 정보를 실제 사용가능한 DB 정보로 변경하셔야 합니다.

그럼.. 즐거운 하루되십시오.
감사합니다.

이 페이지의 구성

묻고 답하기