Tag Archives: Spring——Artifact spring:war exploded: Error during artifact deployment. See server log for details

[Solved] Spring Error: Artifact spring:war exploded: Error during artifact deployment. See server log for details

Tomcat loading problem

After modifying the name of a class, use idea to automatically modify the name of this class. After modification, an error is reported:

Artifact storage:war exploded: Error during artifact deployment. See server log for details

Solution 1: regenerate the war package

1. In tomcat, delete the war package of the project

2. In idea -> Delete the war package in project settings and repackage it.

3. In tomcat, reload the war package

Method 2: regenerate the web xml

Check the log and find the web.inf under web-inf XML error. Delete web.XML, reconfigure XML

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
         version="4.0">

    <servlet>
        <servlet-name>dispatcherServlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        <init-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath:springmvc.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcherServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
</web-app>