Springboot项目因为kackson版本问题启动报错解决方案
问题现象
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcatat org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:137) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:536) ~[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at startdemo.StartdemoApplication.main(StartdemoApplication.java:15) [classes/:na]
Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcatat org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.initialize(TomcatEmbeddedServletContainer.java:123) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.<init>(TomcatEmbeddedServletContainer.java:84) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getTomcatEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:554) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.getEmbeddedServletContainer(TomcatEmbeddedServletContainerFactory.java:179) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:164) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:134) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]... 8 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.databind.ObjectMapperat org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.boot.web.servlet.ServletContextInitializerBeans.getOrderedBeansOfType(ServletContextInitializerBeans.java:234) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:182) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAsRegistrationBean(ServletContextInitializerBeans.java:177) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.web.servlet.ServletContextInitializerBeans.addAdaptableBeans(ServletContextInitializerBeans.java:159) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.web.servlet.ServletContextInitializerBeans.<init>(ServletContextInitializerBeans.java:80) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getServletContextInitializerBeans(EmbeddedWebApplicationContext.java:241) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.selfInitialize(EmbeddedWebApplicationContext.java:228) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.access$000(EmbeddedWebApplicationContext.java:89) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext$1.onStartup(EmbeddedWebApplicationContext.java:213) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.context.embedded.tomcat.TomcatStarter.onStartup(TomcatStarter.java:55) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5196) ~[tomcat-embed-core-8.5.14.jar:8.5.14]at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ~[tomcat-embed-core-8.5.14.jar:8.5.14]at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) ~[tomcat-embed-core-8.5.14.jar:8.5.14]at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) ~[tomcat-embed-core-8.5.14.jar:8.5.14]at java.util.concurrent.FutureTask.run(Unknown Source) ~[na:1.8.0_121]at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:1.8.0_121]at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:1.8.0_121]at java.lang.Thread.run(Unknown Source) ~[na:1.8.0_121]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.databind.ObjectMapperat org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]... 26 common frames omitted
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.fasterxml.jackson.databind.ObjectMapperat org.springframework.http.converter.json.Jackson2ObjectMapperBuilder.build(Jackson2ObjectMapperBuilder.java:588) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.http.converter.json.MappingJackson2HttpMessageConverter.<init>(MappingJackson2HttpMessageConverter.java:57) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.http.converter.support.AllEncompassingFormHttpMessageConverter.<init>(AllEncompassingFormHttpMessageConverter.java:61) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.web.filter.HttpPutFormContentFilter.<init>(HttpPutFormContentFilter.java:63) ~[spring-web-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.boot.web.filter.OrderedHttpPutFormContentFilter.<init>(OrderedHttpPutFormContentFilter.java:29) ~[spring-boot-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration.httpPutFormContentFilter(WebMvcAutoConfiguration.java:166) ~[spring-boot-autoconfigure-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$29ab2425.CGLIB$httpPutFormContentFilter$1(<generated>) ~[spring-boot-autoconfigure-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$29ab2425$$FastClassBySpringCGLIB$$1c9d1ecb.invoke(<generated>) ~[spring-boot-autoconfigure-1.5.3.RELEASE.jar:1.5.3.RELEASE]at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) ~[spring-context-4.3.8.RELEASE.jar:4.3.8.RELEASE]at org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration$$EnhancerBySpringCGLIB$$29ab2425.httpPutFormContentFilter(<generated>) ~[spring-boot-autoconfigure-1.5.3.RELEASE.jar:1.5.3.RELEASE]at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_121]at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_121]at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_121]at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.3.8.RELEASE.jar:4.3.8.RELEASE]... 27 common frames omitted
解决方法
更改pom文件的配置
<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-databind</artifactId><exclusions><exclusion><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId></exclusion></exclusions>
</dependency>
<dependency><groupId>com.fasterxml.jackson.core</groupId><artifactId>jackson-annotations</artifactId><version>2.9.0</version>
</dependency>
Springboot项目因为kackson版本问题启动报错解决方案相关推荐
- Springboot 项目金蝶中间件AAS-9.0启动报错 javax.persistence.Table.indexes()[Ljavax/persistence/Index 问题解决
Springboot 项目金蝶中间件AAS-9.0启动报错 java.lang.NoSuchMethodError: javax.persistence.Table.indexes()[Ljavax/ ...
- Mysql启动报错解决方案:Failed to open log (file ‘./mysql-bin.000901‘, errno 2)
Mysql启动报错解决方案:Failed to open log (file './mysql-bin.000901', errno 2) 参考文章: (1)Mysql启动报错解决方案:Failed ...
- minio-server服务器安装(无限速下载)及启动报错解决方案(一)
minio-server服务器安装(无限速下载)及启动报错解决方案,报错ERROR Invalid command line arguments: Incorrect number of endpoi ...
- springboot项目集成了mybatis之后编译报错
报错如下: [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------ ...
- SpringCloud微服务项目启动报错解决方案
报错代码 2022-02-28 10:48:26.354 INFO 5608 --- [ main] com.lsy.NacosConfigApplication : Starting NacosCo ...
- Jmeter启动报错解决方案
安装好jmeter之后在启动Jmeter的过程中出现了如下的报错信息(大部分的原因是配置不对): /usr/local/Cellar/jmeter/5.1.1/libexec/bin/jmeter: ...
- Springboot打包成jar包后启动报错It was loaded from the following location
之前在使用springboot开发系统的时候,用到了@Resouse的注解,在IDEA运行时没有发生任何异常,但是打包部署的时候就报jar包冲突. 09:07:51.234 [main] ERROR ...
- Vue项目启动报错解决方案
废话不多说,上解决方案 Step1:npm cache clean --force Step2:rm -rf node_modules Step3:rm -rf package-lock.json S ...
- elasticsearch启动报错解决方案
1.启动找不到Java环境 Could not find any executable java binary. Please install java in your PATH or set JAV ...
最新文章
- 人脸识别是怎么识别的?为什么需要大数据?(原理篇)
- Ubuntu16.04 python2.7升级python3.5
- linux下多种锁的比较
- qt中QListView的用法和QModelIndex的使用
- Linux的slab和nginx的区别,Nginx核心知识100讲》nginx Slab管理器
- 推荐几个.NET开源图表组件 [转]
- Redis:10---List对象
- 计算机视觉,不可能凉!
- (44)常用终端命令总结
- 海量数据库的查询优化及分页算法方案(3)--改善SQL语句[转]
- 驾驭大数据,全民打飞机(转)
- python笔记——常用的内置函数
- linux安装apache+php+mysql_linux编译安装Apache+PHP+Mysql
- Win32开发笔记(一):整体流程
- 4K网络视频下载器:4K Video Downloader mac汉化教程
- iReport —— A4打印,只占纸张的一半,如何解决
- Android:证书生成
- 文档型非关系数据库MongoDB经验总结
- NAT444技术简介
- 金山云发布感知评价指标KPA 拨开遮挡高清视频技术的迷雾
热门文章
- mysql 中遍历查询_mysql中循环查询
- PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fi
- 皮一皮:谈恋爱一定要谨慎...
- 为什么中国程序员工作不轻松,加班多?
- html图片上下左右滑动,一个支持任意尺寸的图片上下左右滑动效果
- 衡阳技师学校计算机系,2017级计科师范专业到衡阳技师学院见习
- java poi excel读写_JAVA-POI操作Excel读写
- oracle中的sql%rowcount
- micronet 测试
- RetinaFace Mxnet转TensorRT