오류 메시지
Request processing failed; nested exception is org.apache.ibatis.binding.BindingException:
Invalid bound statement (not found): com.mycompany.idev.mapper.QuestionMapper.getPageList
원인
root-context.xml 파일의 mapperLocations에 매퍼 XML 파일이 위치한 경로를 정의하지 않아서 오류가 발생했다.
<property name="mapperLocations">
<list>
<value>classpath:META-INF/mybatis/member.xml</value>
<value>classpath:META-INF/mybatis/notice.xml</value>
<value>classpath:META-INF/mybatis/performance.xml</value>
</list>
</property>
해결 방법
root-context.xml 파일에 매퍼 XML 파일의 경로를 정의합니다. (question.xml)
<property name="mapperLocations">
<list>
<value>classpath:META-INF/mybatis/member.xml</value>
<value>classpath:META-INF/mybatis/notice.xml</value>
<value>classpath:META-INF/mybatis/performance.xml</value>
<value>classpath:META-INF/mybatis/question.xml</value>
</list>
</property>
+추가
오류 메시지
Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'start_time' not found. Available parameters are [perform_date, param3, perform_idx, param1, param2, start_date]
원인
Mapper 인터페이스에서 @Param으로 파라미터 이름을 잘못 지정했다.
int getIdx(@Param("perform_idx") int perform_idx ,@Param("start_date") String start_date);
해결 방법
파라미터 이름을 수정하였습니다.
int getIdx(@Param("perform_idx") int perform_idx, @Param("start_time") String start_time);
++추가
오류 메시지
BindingException: Parameter 'theater_idx' not found. Available parameters are [arg1, arg0, param1, param2]
원인
Mapper 인터페이스에서 파라미터를 읽지 못한다.
int leftSeat(int theater_idx, int schedule_idx);
해결 방법
Mapper 인터페이스에서 파라미터 앞에 @Param 어노테이션을 추가합니다.
int leftSeat(@Param("theater_idx") int theater_idx, @Param("schedule_idx") int schedule_idx);
'오류 해결' 카테고리의 다른 글
[DataTables] 3. DataTables warning: Cannot reinitialise DataTable 해결방법 (0) | 2022.09.16 |
---|---|
[DataTables] 4. DataTables warning: Requested unknown parameter 해결 방법 (0) | 2022.09.15 |
[JavaScript] Uncaught TypeError : is not a function 해결 방법 (0) | 2022.09.14 |
[JDBC] BadSqlGrammarException (0) | 2022.05.03 |
[Mybatis] java.sql.SQLException: 부적합한 열 유형: 1111 (0) | 2022.05.02 |
댓글