< 에러 메시지 >
SEVERE: 경로 [/11]의 컨텍스트 내의 서블릿 [pf]을(를) 위한 Servlet.service() 호출이, 근본 원인(root cause)과 함께, 예외 [Request processing failed; nested exception is org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0]을(를) 발생시켰습니다.
org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
EmptyResultDataAccessException
데이터베이스에서 결과를 반환하지 않았을 때 발생
- 쿼리 결과가 없을 때의 대안적인 처리 로직 주현
- 결과가 없을 때 예외를 무시하고 진행
- 사용자에게 적절한 오류 메시지를 표시
< 원인 >
기대값은 1인데 결과값이 없어 발생
editPage.do에서 boardSeq값을 못찾음
< 해결>
<a href="<c:url value='/forum/notice/editPage.do?boardSeq=${board.boardSeq}&boardTypeSeq=${board.boardTypeSeq}'/>">
editPage.do를 보낼때 boardSeq값을 같이 보냄
'에러 모음' 카테고리의 다른 글
BadSqlGrammarException (0) | 2024.05.09 |
---|---|
TransientDataAccessResourceException (0) | 2024.05.09 |
TransientDataAccessResourceException (0) | 2024.05.08 |
No Mapping, PageNotFound - 맵핑 에러 (0) | 2024.05.08 |
TransientDataAccessResourceException, SQLException (0) | 2024.04.27 |