728x90
에러 내용
Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content type is element-only.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) ~[xercesImpl-2.9.1.jar:na]
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source) ~[xercesImpl-2.9.1.jar:na]
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[xercesImpl-2.9.1.jar:na]
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) ~[xercesImpl-2.9.1.jar:na]
에러 원인
- xml의 헤더 상단에 <?xml version="1.0" encoding="UTF-8" ?> 누락
- xml상의 오타
에러 해결
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 36 in XML document from ServletContext resource [/WEB-INF/config/spring/context-datasource.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 36; columnNumber: 9; cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content type is element-only.
에러코드를 잘 살펴보니 context-datasource.xml 36번째 라인에 오타가 있어 수정 완료.
728x90
'개발관련 > JAVA' 카테고리의 다른 글
[JAVA] html에서 img 태그 src 이미지 URL 추출(Pattern 정규식 사용) (0) | 2025.03.26 |
---|---|
[JAVA] 문자열 byte 확인, byte 단위로 자르기 (0) | 2022.08.03 |