putyourheart 2020-03-25 20:12 采纳率: 50%
浏览 784
已采纳

IDEA运行现有SSH框架的WEB项目报错

用IDEA运行已经写好的web项目,此前也成功运行。
今天在用相同的方式却无法运行,报错如下:

三月 25, 2020 8:07:29 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
三月 25, 2020 8:07:29 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesJdbc
严重: The web application [] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2020-03-25 08:07:29,948] Artifact web_new:war exploded: Error during artifact deployment. See server log for details.

背景:

IDEA,web为SSH架构,tomcat7.0.82
此前运行没有问题。

tomcat log:

严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring-hibernate.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring-hibernate.xml]: Cannot resolve reference to bean 'myShiroRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myShiroRealm' defined in class path resource [spring-hibernate.xml]: Cannot resolve reference to bean 'sessionFactory' while setting bean property 'hibernateSessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [spring-hibernate.xml]: Cannot resolve reference to bean 'dataSource' while setting bean property 'dataSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [spring-hibernate.xml]: Invocation of init method failed; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

三月 25, 2020 8:07:29 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
三月 25, 2020 8:07:29 下午 org.apache.catalina.core.ApplicationContext log
信息: Shutting down log4j

求解决方法,谢谢。

  • 写回答

2条回答 默认 最新

  • Json-Huang 2020-03-25 22:14
    关注

    1、检查下数据库是否正常启动;
    2、jdbc连接配置如端口、用户名和密码等是否跟数据库一致?

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
  • C.     ོ 2020-03-25 22:54
    关注

    数据库没有连接上
    如果之前一直都好使,有时候是已重新开机就连接不上的情况,可能是数据库被电脑关闭了图片说明这种情况就需要手动打开

    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 西门子博途 s7 1200控制三台步进电机
  • ¥15 基于非参数的方向距离函数求污染物影子价格(有偿)
  • ¥15 vue+element 生成table
  • ¥15 实验 4 FIFO 算法和 LRU 算法-C 程序实现
  • ¥30 电脑画面同步投屏,通过同wifi的方式投屏方法,接收投屏端不需要安装第三方软件,
  • ¥15 有偿拼接大疆精灵4RGB影像
  • ¥15 Arduino实现音频混响
  • ¥15 cuda.jit加速报错
  • ¥15 Octave 安装工具箱出错 Only Win32 target is supported!
  • ¥15 docker save的不能在另一台设备运行