Type Exception Report
Message Request processing failed: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.thymeleaf.spring5.view.ThymeleafView]: Unresolvable class definition
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
jakarta.servlet.ServletException: Request processing failed: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.thymeleaf.spring5.view.ThymeleafView]: Unresolvable class definition
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1022)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
Root Cause
org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.thymeleaf.spring5.view.ThymeleafView]: Unresolvable class definition
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:150)
org.thymeleaf.spring5.view.ThymeleafViewResolver.loadView(ThymeleafViewResolver.java:837)
org.thymeleaf.spring5.view.ThymeleafViewResolver.createView(ThymeleafViewResolver.java:796)
org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:184)
org.springframework.web.servlet.DispatcherServlet.resolveViewName(DispatcherServlet.java:1472)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1407)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1167)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1106)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
Root Cause
java.lang.NoClassDefFoundError: javax/servlet/ServletException
java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3429)
java.base/java.lang.Class.getConstructor0(Class.java:3634)
java.base/java.lang.Class.getDeclaredConstructor(Class.java:2810)
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
org.thymeleaf.spring5.view.ThymeleafViewResolver.loadView(ThymeleafViewResolver.java:837)
org.thymeleaf.spring5.view.ThymeleafViewResolver.createView(ThymeleafViewResolver.java:796)
org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:184)
org.springframework.web.servlet.DispatcherServlet.resolveViewName(DispatcherServlet.java:1472)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1407)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1167)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1106)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
Root Cause
java.lang.ClassNotFoundException: javax.servlet.ServletException
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1353)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1165)
java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3429)
java.base/java.lang.Class.getConstructor0(Class.java:3634)
java.base/java.lang.Class.getDeclaredConstructor(Class.java:2810)
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:141)
org.thymeleaf.spring5.view.ThymeleafViewResolver.loadView(ThymeleafViewResolver.java:837)
org.thymeleaf.spring5.view.ThymeleafViewResolver.createView(ThymeleafViewResolver.java:796)
org.springframework.web.servlet.view.AbstractCachingViewResolver.resolveViewName(AbstractCachingViewResolver.java:184)
org.springframework.web.servlet.DispatcherServlet.resolveViewName(DispatcherServlet.java:1472)
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1407)
org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1167)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1106)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.mizuro.spring</groupId>
<artifactId>SpringMVC</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>SpringMVC Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<spring.version>6.1.3</spring.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.10.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity5</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
</dependencies>
<build>
<finalName>SpringMVC</finalName>
</build>
</project>