weixin_38660131
weixin_38660131
2018-08-16 01:55
采纳率: 0%
浏览 1.7k

mysql连接不上,急!!

八�� 16, 2018 9:49:01 上午 org.apache.catalina.loader.WebappClassLoaderBase checkStateForResourceLoading
信息: Illegal access: this web application instance has been stopped already. Could not load [com.alibaba.druid.pool.DruidDataSource]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [com.alibaba.druid.pool.DruidDataSource]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1359)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1347)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1206)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
at org.apache.logging.log4j.util.LoaderUtil.loadClass(LoaderUtil.java:139)
at org.apache.logging.log4j.core.impl.ThrowableProxy.loadClass(ThrowableProxy.java:548)
at org.apache.logging.log4j.core.impl.ThrowableProxy.toExtendedStackTrace(ThrowableProxy.java:660)
at org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:163)
at org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:140)
at org.apache.logging.log4j.core.impl.ThrowableProxy.(ThrowableProxy.java:121)
at org.apache.logging.log4j.core.impl.Log4jLogEvent.getThrownProxy(Log4jLogEvent.java:555)
at org.apache.logging.log4j.core.pattern.ExtendedThrowablePatternConverter.format(ExtendedThrowablePatternConverter.java:61)
at org.apache.logging.log4j.core.pattern.PatternFormatter.format(PatternFormatter.java:38)
at org.apache.logging.log4j.core.layout.PatternLayout$PatternSerializer.toSerializable(PatternLayout.java:294)
at org.apache.logging.log4j.core.layout.PatternLayout.toText(PatternLayout.java:195)
at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:180)
at org.apache.logging.log4j.core.layout.PatternLayout.encode(PatternLayout.java:57)
at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.directEncodeEvent(AbstractOutputStreamAppender.java:176)
at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.tryAppend(AbstractOutputStreamAppender.java:169)
at org.apache.logging.log4j.core.appender.AbstractOutputStreamAppender.append(AbstractOutputStreamAppender.java:160)
at org.apache.logging.log4j.core.config.AppenderControl.tryCallAppender(AppenderControl.java:156)
at org.apache.logging.log4j.core.config.AppenderControl.callAppender0(AppenderControl.java:129)
at org.apache.logging.log4j.core.config.AppenderControl.callAppenderPreventRecursion(AppenderControl.java:120)
at org.apache.logging.log4j.core.config.AppenderControl.callAppender(AppenderControl.java:84)
at org.apache.logging.log4j.core.config.LoggerConfig.callAppenders(LoggerConfig.java:447)
at org.apache.logging.log4j.core.config.LoggerConfig.processLogEvent(LoggerConfig.java:432)
at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:416)
at org.apache.logging.log4j.core.config.LoggerConfig.log(LoggerConfig.java:402)
at org.apache.logging.log4j.core.config.AwaitCompletionReliabilityStrategy.log(AwaitCompletionReliabilityStrategy.java:63)
at org.apache.logging.log4j.core.Logger.logMessage(Logger.java:146)
at org.apache.logging.log4j.spi.AbstractLogger.logMessageSafely(AbstractLogger.java:2091)
at org.apache.logging.log4j.spi.AbstractLogger.logMessage(AbstractLogger.java:2011)
at org.apache.logging.log4j.spi.AbstractLogger.logIfEnabled(AbstractLogger.java:1884)
at org.apache.logging.slf4j.Log4jLogger.error(Log4jLogger.java:309)
at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnableImpl.run(AcquireJobsRunnableImpl.java:77)
at java.lang.Thread.run(Thread.java:745)

[ERROR] [2018-08-16 09:49:01] [Class=org.activiti.engine.impl.jobexecutor.AcquireJobsRunnableImpl | Method=run | Line=77] | exception during job acquisition: Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed at Thu Aug 16 09:48:53 CST 2018
org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed at Thu Aug 16 09:48:53 CST 2018
at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:245) ~[spring-jdbc-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:373) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) ~[spring-tx-4.1.5.RELEASE.jar:4.1.5.RELEASE]
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) ~[activiti-spring-5.22.0.jar:5.22.0]
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) ~[activiti-engine-5.22.0.jar:5.22.0]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) ~[activiti-engine-5.22.0.jar:5.22.0]
at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35) ~[activiti-engine-5.22.0.jar:5.22.0]
at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnableImpl.run(AcquireJobsRunnableImpl.java:54) [activiti-engine-5.22.0.jar:5.22.0]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_40]
Caused by: com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed at Thu Aug 16 09:48:53 CST 2018
at com.alibaba.druid.pool.DruidDataSource.getConnectionInternal(DruidDataSource.java:1340) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.pool.DruidDataSource.getConnectionDirect(DruidDataSource.java:1241) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4619) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.filter.FilterAdapter.dataSource_getConnection(FilterAdapter.java:2745) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4615) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.filter.stat.StatFilter.dataSource_getConnection(StatFilter.java:680) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.filter.FilterChainImpl.dataSource_connect(FilterChainImpl.java:4615) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1219) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1211) ~[druid-1.1.5.jar:1.1.5]
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:105) ~[druid-1.1.5.jar:1.1.5]
at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:204) ~[spring-jdbc-4.1.5.RELEASE.jar:4.1.5.RELEASE]
... 8 more

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

11条回答 默认 最新

  • caozhy

    Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.DataSourceClosedException: dataSource already closed
    看下为什么jdbc连接关闭了,是不是你自己关闭了然后又去访问,或者连接配置不对,没有打开。

    点赞 评论
  • zhaomin_g
    _zming 2018-08-16 02:02

    this web application instance has been stopped already你是不是开启了自动加载?手动重启tomcat看下看看,如果不行,贴日志

    点赞 评论
  • AnselAndEvil
    Ansel-su 2018-08-16 02:03

    应该是取不到数据源 ,先检查配置文件,然后cmd试试本地能不能连上数据库,数据库版本或者jdbc相关的jar的版本都有可能导致这个问题

    点赞 评论
  • weixin_38660131
    weixin_38660131 2018-08-16 02:13

    本地都能连上数据库,昨天还好好的,今天启动这个项目就成这样了,tomcat也重新删除在添加,还是这有

    点赞 评论
  • cxy258119025
    cxy258119025 2018-08-16 02:50

    https://blog.csdn.net/wwrzyy/article/details/78036542?fps=1&locationNum=8
    看看这篇文字跟你的问题是一样的。。他写的比较详细,我就不多说了
    原因是:因为在定时器中手动获取了 DataSource,然后使用后关闭了或者用完后长期不再用被连接池自动关闭
    记得给悬赏。3Q

    点赞 评论
  • qq_38342475
    黑羽真兔 2018-08-16 04:13

    你连的是本地的mysql数据库还是远程的?然后看一下mysql的服务有开吗?在任务管理器里面查看——》服务

    点赞 评论
  • xcgh
    xcgh 2018-08-16 05:58

    本地是ssh跳转链接的吗?Bitvise SSH Client用这个软件映射就可了

    点赞 评论
  • u014185152
    ccs12343 2018-08-16 08:13

    他报的非法路径啊。你看看你的路径配的有没有问题

    点赞 评论
  • u014185152
    ccs12343 2018-08-16 08:14

    DruidDataSource是不是在这里面配的 数据库连接 仔细检查一下

    点赞 评论
  • qq_39872018
    逸_0520 2018-08-16 09:31

    应该是tomcat的问题,tomcat中的插件没有运行起来,如果重启tomcat不好使的话就换一个版本的tomcat试试

    点赞 评论
  • qq_29777207
    张音乐 2018-08-20 02:27

    Could not open JDBC Connection for transaction
    是不是你的IP地址发生变化了

    点赞 评论

相关推荐