2019独角兽企业重金招聘Python工程师标准>>>

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
MLog initialization issue: slf4j found no binding or threatened to use its (dangerously silent) NOPLogger. We consider the slf4j library not found.
log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
java.sql.SQLException: Connections could not be acquired from the underlying database!
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:690)
at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
at com.chinamworld.db.DBManager.insert(DBManager.java:60)
at Test.main(Test.java:28)
Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1463)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:639)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:549)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:756)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:683)

... 3 more

以上问题可能有一下原因造成:

1,驱动配置有误:driver=com.mysql.jdbc.Driver
2,数据库连接地址有误:url=jdbc:mysql://localhost:3306/test?3useUnicode=true&characterEncoding=utf8
3,密码或帐号有误:username=root
      password=root

4,数据库未启动或无权访问

5,项目未引入对应的驱动jar包mysql-connector-java-5.1.6-bin.jar

6,mysql root没有远程访问的权限,需要增加权限,增加权限的步骤如下:
进入mysql数据库:
grant all privileges on *.* to 'root'@'%' identified by 'root' with grant option;
flush privileges;

转载于:https://my.oschina.net/u/584806/blog/351866

Connections could not be acquired from the underly相关推荐

  1. Exception in thread “main“ java.sql.SQLException: Connections could not be acquired from the underly

    之前搜索都是配置项问题: 1.端口号 ip地址 2.账号 密码 <named-config name="greemysql"><property name=&qu ...

  2. 【JDBC 报错】Connections could not be acquired from the underlying database!

    项目启动报错: 1 [2016-07-13 10:04:15,074] ERROR org.apache.ibatis.executor.BaseExecutor Could not get a da ...

  3. SSM:出现Connections could not be acquired from the underlying database异常的解决

    QUESTION:SSM:出现Connections could not be acquired from the underlying database异常的解决 ANSWER: 近期在学习ssm框 ...

  4. Connections could not be acquired from the underlying database异常,已解决。

    问题描述 在运用JDBC连接数据库时,用的是C3P0数据源,出现Connections could not be acquired from the underlying database!这个异常 ...

  5. 解决:Connections could not be acquired from the underlying database!(mysql)

    这两天一直有这个bug出现,记录一下解决方案和总结. 解决方案: 1.驱动配置错误(本人的bug) 2.数据库连接地址错误 3.账号密码错误 4.数据库未启动或者无权访问,如没有联网的情况下 5.版本 ...

  6. Hibernate 错误记录Connections could not be acquired from the underlying database!

    Hibernate 错误记录Connections could not be acquired from the underlying database! 错误详情 网上的解决办法 我的错误解决 错误 ...

  7. 新手解决Connections could not be acquired from the underlying database!Java代码上传到服务器连接不上数据库

    本人刚入门Java,最近在开发一个项目,由于项目中有些问题需要与客户沟通.就想着把程序先上传到服务器上,先是上传到我之前用的服务器,服务器没有配置Java 环境.我自己配置好环境后把编译后代码上传上去 ...

  8. 服务器Connections could not be acquired from the underlying database错误

    在写一个ssm框架的demo中,在spring整合mybatis后开始运行时,服务器出现了一个报错: org.springframework.web.util.NestedServletExcepti ...

  9. Oracle 换库时发生 Connections could not be acquired from the underlying database

    在进行数据库切换发生如下错误: Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionExce ...

最新文章

  1. ARM+linux+2440嵌入式开发相关经典书籍(转)
  2. SQL server 2005服务器备份文件的强制还原后引起的孤立用户问题解决方法
  3. protocol buffer介绍(protobuf)
  4. Lucene学习总结之八:Lucene的查询语法,JavaCC及QueryParser
  5. spark streaming 的 Job创建、调度、提交
  6. 和某ZYC巨佬和XXY巨佬的随机挑战2总结
  7. C#取整函数Math.Round、Math.Ceiling和Math.Floor 【非原创,用来收藏,分享】
  8. 百度SEO站群支付宝当面付打赏系统源码
  9. ubuntu12.04 java配置_Ubuntu 12.04 中安装和配置 Java JDK
  10. 2.Servlet(一)
  11. Centos6.5搭建mongodb分片
  12. 详解C/C++预处理器
  13. 毕业设计基于SpringBoot框架的作业查重系统
  14. 软件测试主要种类大全
  15. Dell台式计算机BIOS放电,戴尔BIOS设置电池维修笔记本电脑电池BIOS设置图形方法...
  16. 汽车发动机号码编码规则
  17. java 以10为底的对数_获取Java中值的以10为底的对数
  18. oracle 对象同义词,Oracle数据库对象_同义词
  19. 以华为2016年笔试题为例,详解牛客网的在线判题系统(OJ模式)
  20. android涂鸦板保存功能,Android 使用Path实现涂鸦功能

热门文章

  1. “昔之善战者,先为不可胜,以待敌之可胜”的理解
  2. 云平台编程与开发(六):物联网云平台的架构设计设想(基于X5Cloud云平台)
  3. 粒子回旋加速器(Cyclotron)的原理
  4. 阿里云 数据盘挂载及卸载
  5. java 正切_Java Math.tan()/Math.tanh() 计算正切/双曲正切
  6. HTML5网页设计阶梯教程(5)——如何设置单元格背景与如何合并单元格
  7. 辐射度量学和渲染方程
  8. overlay filesystem
  9. [数据结构 -- C语言] 堆实现Top-K问题,原来王者荣耀的排名是这样实现的,又涨知识了
  10. Java之校验qq号