Error:
Error creating bean with name’org.springframework.web.servlet.handler.SimpleUrlHandlerMapping0’: Instantiation of bean failed;
Error Message:
05-Sep-2021 16:44:18.866 Message [http-apr-8080-exec-8]
org.springframework.web.servlet.FrameworkServlet.initServletBean Initializing Servlet 'springmvc'
05-Sep-2021 16:44:18.974 Warning [http-apr-8080-exec-8] org.springframework.context.support.AbstractApplicationContext.refresh Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.core.log.LogDelegateFactory.getHiddenLog(Ljava/lang/String;)Lorg/apache/commons/logging/Log;
Cause analysis:
bean instantiation failed
Solution:
There are three ways:
1. Comment out the following comments.
2.Servlet API dependency is missing. Add the following dependencies
<dependency>
<groupId>tomcat</groupId>
<artifactId>servlet-api</artifactId>
<version>5.5.23</version>
</dependency>
3.the web project created has the wrong prototype selected
Read More:
- [Solved] org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org
- [Solved] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xxx‘
- [Solved] JSONUtil.toJsonStr() Error: org.springframework.web.util.NestedServletException: Handler dispatch failed…
- [Siolved] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘webMvcObject
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘testApplicat
- Eureka Build Error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- [Solved] eureka Startup Error: Unable to start web … nested exception is org.springframework.boot.web.server.WebS
- JPA multiple-data source startup error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘t
- [Solved] Spring Aop Error: Error creating bean with name ‘org.springframework.aop.config.internalAutoProxyCreator‘
- [Solved] org.springframework.context.ApplicationContextException: Failed to start bean ‘org.springframework.a
- [Solved] SpringBoot Startup Error: org.springframework.beans.factory.UnsatisfiedDependencyException Error creating
- Spring Aop error creating bean with name ‘org.springframework.aop.config.internalAutoProxyCreator
- [Solved] Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerExcepti
- [Solved] ApiPost Error: org.springframework.web.multipart.MultipartException
- [Solved] Upload Files Error: Request processing failed;nested exception is org.springframework.web.multipart.MultipartExcepti
- [Solved] Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type…
- Defining a bean of type ‘org.springframework.data.redis.core.RedisTemplate‘ in your configuration.