Study/Spring framework

전자정부 프레임워크 -오류 : cvc-complex-type.2.3

nobang 2018. 10. 14. 12:16
728x90

전자정부 프레임워크 All in one 에서

web_allinone.xml 을 수정했는데

갑자기 에러가 난다.

cvc-complex-type.2.3: Element 'web-app' cannot have character [children], because the type's content type is element-only.    web_allinone.xml    /allinone/src/main/webapp/WEB-INF    line 5    XML Problem


저 부분은 건드린 것이 없는데...

<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> 


1개의 element만 사용할 수 있다고 하는데

자세히 보면 xsi:schemaLocation에 두 개가 정의되어 있다.

그중에 xmlns:web에 똑같은 내용이 있어서

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd를 제거하니 오류가 없어진다.

<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee"> 



728x90