본문 바로가기
Error

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.samskivert.mustache.MustacheException$Context

by YoonJong 2022. 8. 6.
728x90

에러내용

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.samskivert.mustache.MustacheException$Context: No key, method or field with name 'id' on line 24] with root cause

 

에러원인

스프링부트와 aws로 혼자 구현하는 웹서비스 공부 도중에 에러가 났다.

당연히 500 에러니까 서버에러겠지 하고 구글링을 했다.

DB 는 동작중이었고, 저장을 눌렀을 때 h2 DB 까지도 값이 들어가는 걸 확인했다.

그래서 1번을 중점적으로 봤다. 

 

에러조치

Dto 에서 생성자가 죽어있었다..

자동완성의 실수였다. 

전체 조회 목록의 Dto 생성자여서 entity 를 활용해야 하므로 바꿔주었다.

 

 

 

 

 

 

 

 

 

참고

https://eugene-kim.tistory.com/31

 

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exc

Query에 Null 값이 들어갔을 경우 발생하는 문제입니다. 해결 방법 1. Controller, DAO, Service 단에서 각각에 넘겨주는 쿼리값의 주입이 됐는지 확인 2. DB가 run 중인지 확인 출처: https://beagle-dev.tistor..

eugene-kim.tistory.com

 

728x90

댓글