분류 전체보기33 [spring] Mapper method 'com.kjh.sanction.mapper.SanctionMapper.tmprAt attempted to return null from a method with a primitive return type (int).]을(를) 발생시켰습니다. 오류 해결하기 컨트롤러에서 데이터를 조회하는 쿼리를 실행하니 아래와 같은 에러가 발생했다. org.apache.ibatis.binding.BindingException: Mapper method 'com.kjh.sanction.mapper.SanctionMapper.tmprAt attempted to return null from a method with a primitive return type (int). 내가 반환받을 타입은 int인데 조회한 데이터는 int가 아니기 때문에 조회를 하지 못하고 null을 반환한 것이다. 내가 작성한 쿼리문이다. SELECT 1 FROM ELCTRNSANCTN WHERE TMPR_AT = 'Y' AND ELCTRN_SANCTN_SN = #{elctrnSanctnSn} 위 코드를 보.. 2021. 12. 22. [spring] Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException 오류 해결하기 컨트롤러에서 쿼리문이 잘 짜여졌나 테스트를 하는 과정에서 오류가 발생했다. 심각: 경로 []의 컨텍스트 내의 서블릿 [appServlet]을(를) 위한 Servlet.service() 호출이, 근본 원인(root cause)과 함께, 예외 [Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: java.sql.SQLSyntaxErrorException: ORA-00933: SQL command not properly ended ### The error may exist in file [C:\dalmuti\.metadata\... 2021. 12. 7. [spring] javax.servlet.ServletException: 서블릿 [appServlet]을(를) 위한 Servlet.init() 호출이 예외를 발생시켰습니다. 오류 해결하기 아래와 같은 오류가 발생했다. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'Controller': Unsatisfied dependency expressed through field 'service'; 찾아보니 컨트롤러, 서비스 등에 어노테이션을 붙이지 않아서 발생하는 것이 주원인이었다. 하지만 나는 그 문제가 아니었다. 또 xml이나 DB와 연결되는 부분을 살펴보라고 해서 찾아봤는데 잘못된 부분이 없었다. 오류를 자세히 살펴보다 mapper 관련인 것 같았다. 생각해보니 mapper 패키지의 경로를 변경하였는데 root-context에서 경로를 변경하지 않았다는 것을 깨달았다.. 2021. 12. 3. [spring] Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for 오류 해결하기 아아.. 글을 실수로 잘못 삭제했다ㅜㅜ Neither BindingResult nor plain target object for bean name 'searchVO' available as request attribute 관련 오류였는데.. 되게 열심히 썼는데 ㅜㅜ 여기 고치니 다음 부분이 오류고 거기 고치니 그 다음 부분이 오류고 .. 그래서 열심히 썼는데 .. 하 속상해 ㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠㅠ 다음에 관련 오류가 안 뜨길 바라겠지만 혹..시나 보게 된다면 다시 작성해야지 ㅠㅠ 아무튼 이번 오류는 Caused by: java.lang.IllegalArgumentException: Mapped Statements collection already contains value for 라는 오류였다. 검색해보.. 2021. 11. 18. 이전 1 2 3 4 ··· 9 다음