본문 바로가기

개발/Spring

More than one fragment with the name [spring_web] was found. 에러 발생시 조치 사항

java 1.7 에서 1.8 로 업그레이드 후 다음과 같은 에러가 발생했다.

 

Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering. See section 8.2.2 2c of the Servlet specification for details. Consider using absolute ordering.

 

web.xml 파일을 아래와 같이 수정해서 해결하였다.

 

1. 기존에는 스키마 버전이 2.5 였는데 xsi:schemaLocation 과 version 을 3.0 으로 변경.

2. <absolute-ordering /> 태그 추가

 

 

위와 같이 했는데도 계속 오류가 발생한다면 Maven clean 후 다시 Install 받으면 될 것이다.