close

[Solved] Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering

Hello Guys, How are you all? Hope You all Are Fine. Today I am facing following error Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering in Java. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How This Error Occurs ?

I am facing following error.

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/file-upload-0.0.1-SNAPSHOT]]

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.

java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/file-upload-0.0.1-SNAPSHOT]] at

  1. How To Solve Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering Error ?

    To Solve Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering Error Just add absolute-ordering tag in your web.xml file Just under the <display-name> tag. And My error was solved. Second solution is You just need to check that your dependencies to see if you have a dependency to another Spring-version.

  2. Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering

    To Solve Caused by: java.lang.IllegalArgumentException: More than one fragment with the name [spring_web] was found. This is not legal with relative ordering Error Just add absolute-ordering tag in your web.xml file Just under the <display-name> tag. And My error was solved. Second solution is You just need to check that your dependencies to see if you have a dependency to another Spring-version.

Solution 1: Add absolute-ordering tag

Just add absolute-ordering tag in your web.xml file Just under the <display-name> tag. Just like this.

<display-name>
   <absolute-ordering />
</display-name>

And My error was solved.

Solution 2: check dependencies

You just need to check that your dependencies to see if you have a dependency to another Spring-version.

mvn dependency:tree -Dverbose -Dincludes=groupId:artifactId

Summary

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?

Also, Read

Please Rate Our Solution to Motivate Us For Give Our Best

Leave a Comment