IDEA 项目运行报错 Error starting Tomcat context. Exception:

本文记录了开发者在使用IDEA 2021.3.2和Maven 3.5.0时遇到的Spring Boot应用启动问题,涉及文件上传Servlet、依赖注入失败和数据库连接配置。通过卸载重装、修复数据库驱动和调整版本,最终解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

IDEA 版本 2021.3.2 maven 版本 3.5.0
2月15号遇到这个问题
16号把IDEA 完全卸载重装了一遍好了
晚上再次出现这个问题
目前仍在寻找解决办法
如成功会再更新

2022-02-17 08:59:03,330 ERROR - [,,,] - [o.s.b.c.e.t.TomcatStarter]  - Error starting Tomcat context. Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'gov.nra.aqjg.util.servlet.fileUploadServlet': Cannot create inner bean '(inner bean)#5d882053' of type [gov.nra.aqjg.util.servlet.fileUploadServlet] while setting bean property 'servlet'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name '(inner bean)#5d882053': Unsatisfied dependency expressed through field 'attachmentService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'attachmentService': Unsatisfied dependency expressed through field 'iAttachmentRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'IAttachmentRepository': Cannot create inner bean '(inner bean)#6fba5aae' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#6fba5aae': Cannot resolve reference to bean 'entityManagerFactory' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active).
2022-02-17 08:59:03,346 WARN - [,,,] - [o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext]  - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
2022-02-17 08:59:03,361 ERROR - [,,,] - [o.s.b.d.LoggingFailureAnalysisReporter]  - 

在这里插入图片描述
点开IDEA 右侧maven 发现依赖报错
公司里的一个大佬说可能因为IDEA版本太高而Maven 版本较低引起
准备去试试看
2.17 -11:45
一上午了 从2021.3.2一路卸载重装到2020.3.4 还是没有恢复正常
我好菜
fuck IDEA
fuck Maven

2.17.15.45
对了 上午还有这个数据库驱动的问题
解决后仍然是最上面图的问题
下午公司的技术经理来了 找半天也没解决
他走了之后我重新导了下这个
解决之后项目可以跑起来了
呜呜 老丢人了
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值