springboot启动tomcat报错 Exception: org.springframework.beans.factory.BeanCreationException

一步亦留痕 2021-09-29 11:23:13

[2021-09-29 11:16:51:188-main] [INFO] - org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:87) - Bean 'com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration' of type [com.alibaba.cloud.sentinel.custom.SentinelAutoConfiguration$$EnhancerBySpringCGLIB$$c65cff1a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[2021-09-29 11:16:52:157-main] [INFO] - org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:87) - Initializing ExecutorService  'taskExecutor'
[2021-09-29 11:16:53:108-main] [INFO] - org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:87) - Tomcat initialized with port(s): 8080 (http)
[2021-09-29 11:16:53:293-localhost-startStop-1] [INFO] - org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:87) - Root WebApplicationContext: initialization completed in 7988 ms
[2021-09-29 11:16:56:220-localhost-startStop-1] [ERROR] - org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:87) - Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'httpPutFormContentFilter' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.web.servlet.filter.OrderedHttpPutFormContentFilter]: Factory method 'httpPutFormContentFilter' threw exception; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.fasterxml.jackson.datatype.jsr310.JavaTimeModule]: Constructor threw exception; nested exception is java.lang.IllegalAccessError: tried to access method com.fasterxml.jackson.databind.ser.std.StdSerializer.<init>(Ljava/lang/Class;)V from class com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
[2021-09-29 11:16:56:296-main] [WARN] - org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:87) - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
[2021-09-29 11:16:56:298-main] [INFO] - org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:87) - Shutting down ExecutorService 'taskExecutor'

...全文
2568 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
一步亦留痕 2021-09-29
  • 打赏
  • 举报
回复

已解决,解决方案如下:费老鼻子劲儿了= =!

<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>
</dependency>

=PNZ=BeijingL 2021-10-01
  • 举报
回复 2
@一步亦留痕
编号灬9527 2021-09-29
  • 打赏
  • 举报
回复

tried to access method com.fasterxml.jackson.databind.ser.std.StdSerializer.(Ljava/lang/Class;

别从网上找pom,从spring initializr 去创建project,选择jdk8,基本就不会出现这些问题

一步亦留痕 2021-09-29
  • 举报
回复
@编号灬9527 这个是一个已经在先维护的项目,由于要和客户对接sdk,引入了jar就报这个了,日志日志的jasckson的报排除了还是报这个= =!
编号灬9527 2021-09-29
  • 举报
回复
@一步亦留痕 maven helper 去看看依赖冲突,然后再决定到底用哪个版本吧
一步亦留痕 2021-09-29
  • 举报
回复
@编号灬9527 没辙了才发的贴子= =!

51,395

社区成员

发帖
与我相关
我的任务
社区描述
Java相关技术讨论
javaspring bootspring cloud 技术论坛(原bbs)
社区管理员
  • Java相关社区
  • 小虚竹
  • 谙忆
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧