org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in ServletContext resource [/WEB-INF/spring/root-context.xml]: Invocation of init method failed; nested exception is java.io.IOException: Failed to parse config resource: class path resource [mybatis-config.xml]
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 65; 문서 루트 요소 "mapper"은(는) DOCTYPE 루트 "null"과(와) 일치해야 합니다.
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
해당 오류는 Mapper.xml 상단에 DOCTYPE을 지정해주면 해결된다.
'Programming > Java' 카테고리의 다른 글
[Spring] Gmail SMTP를 이용하여 이메일 인증 구현 - 설정 (0) | 2025.03.21 |
---|---|
[Error : Mybatis/jdbc] ORA-12541:접속할 수 없습니다. host (host name) port 1521에 리스너가 없습니다. (0) | 2025.03.15 |
[Error : STS4] Several ports (8005, 8080) required by Tomcat v9.0 Server at localhost are already in use / 톰캣 포트 에러 (0) | 2025.03.08 |
[JAVA 기초] 04-1. 클래스와 객체 / 생성자와 소멸자, getter(), setter() (0) | 2025.02.07 |
[JAVA 기초] 03. 접근 제어자 (0) | 2025.02.06 |