Error: Cannot create inner bean ‘org.springframework.http.converter.json.MappingJackson2HttpMessageConverter#0
The spring-mvc.xml configuration file is written like this
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter"> <property name="objectMapper"> <bean class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"> <property name="failOnEmptyBeans" value="false"/> </bean> </property> </bean>
reason:
Only the fastjosn dependency is imported, and the following dependency is not imported
<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.12.4</version> </dependency>
These three jar packages are missing from the generated package
jackson-annotations-2.12.4.jar jackson-databind-2.12.4.jar jackson-core-2.12.4.jar
The problem is solved after importing dependencies.
Read More:
- [Solved] Error creating bean with name ‘mappingJackson2HttpMessageConverter‘ defined in class path resource
- [Solved] org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot
- org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot deseria
- [Solved] SpringBoot Error: org.springframework.http.converter.HttpMessageNotReadableException
- [Solved] Consider defining a bean of type ‘org.springframework.data.redis.core.RedisTemplate‘ in your configu
- [Siolved] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘webMvcObject
- Defining a bean of type ‘org.springframework.data.redis.core.RedisTemplate‘ in your configuration.
- [Solved] HttpMessageNotReadableException: JSON parse error: Unrecognized field “xxxx“
- Springboot startup error “No bean named’org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry’ available”
- [Solved] org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘xxx‘
- [Solved] fasterxml ToStringSerializerBase Error: Caused by: java.lang.NoClassDefFoundError…
- [Solved] Error creating bean with name ‘org.springframework.web.servlet.handler.SimpleUrlHandlerMapping#0‘:
- How to Solve SSM JSON Chinese Messy Code Issue
- [Solved] org.springframework.context.ApplicationContextException: Failed to start bean ‘org.springframework.a
- [Solved] Arthas failed to bind telnet or http port! Telnet port: 3658, http port: 8563;Error creating bean
- [Solved] com.alibaba.fastjson.JSONException: syntax error, pos 1, json
- [Solved] fastjson Error: write javaBean error, fastjson version 1.2.76, class io.undertow.servlet.xx
- [Solved] org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
- [Solved] Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type…
- Spring Aop error creating bean with name ‘org.springframework.aop.config.internalAutoProxyCreator