티스토리 뷰
에러메세지
org.apache.ibatis.reflection.ReflectionException:
There is no getter for property named 'blNo' in 'class com.bookforyou.bk4u.reply.model.vo.Reply'
에러메세지 상세
심각: 경로 [/bk4u]의 컨텍스트 내의 서블릿 [appServlet]을(를) 위한 Servlet.service() 호출이,
근본 원인(root cause)과 함께, 예외 [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'blNo' in 'class com.bookforyou.bk4u.reply.model.vo.Reply']을(를) 발생시켰습니다.
원인
해당 클래스에 blNo(게시글번호)에 대한 getter가 없다는 의미이다.
당연하다.
Reply클래스에서 blNo에 대한 값은 다른 컬럼으로 받아오는데
mapper에서 받아오는 값의 name으로 그대로 써버림
해결방법
mapper파일에서 값을 받아오는 컬럼명으로 알맞게 변경해준다.
이런 실수 뿐만 아니라 주로 오타, 대문자 실수가 많이 있음!
<insert id="insertReply">
insert
into reply
(
reply_no
, mem_no
, reply_type
, ref_post
, reply_content
, reply_refno
, depth
)
values
(
seq_rno.nextval
, #{memNo}
, 2
, #{refPost} // 여기 자리에 blNo라고 써서 오류남
, #{replyContent}
, #{replyRefNo}
, #{depth}
)
</insert>
반응형
'error log' 카테고리의 다른 글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- addFilterBefore
- junit5
- MultipleBagFetchException
- Spring Security
- Cannot construct instance of
- checkout
- FetchJoin
- JPA
- QueryDSL
- Git
- Linux
- 스프링 스케줄링
- ChatGPT
- 추상클래스
- 스프링오류
- jvm warm-up 전략
- Kotlin
- Java
- 배열
- array
- port
- bucket4j
- MongoDB
- spring boot 3
- 티스토리챌린지
- 오블완
- n+1
- dto 클래스 생성자
- redisson 분산락
- 자바 어플리케이션 실행 과정
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
글 보관함