今天在写hibernate连接数据库时出现了这个问题
Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (30). Last acquisition attempt exception:
简单来说就是程序找不到数据库了。
一般情况下出现这种问题都是hibernate.cfg.xml
1驱动配置错误
2数据库连接(URL)错误
3账号密码错误
4数据库不可用
5数据库驱动包未引入
但是我的问题出现在根本就没将hibernate.cfg.xml引入到程序处理过程中
6程序未引入hibernate.cfg.xml
解决方法:加入以下代码

        Configuration cfg=new Configuration();cfg.configure("hibernate.cfg.xml");

Hibernate:Acquisition Attempt Failed Clearing pending acquires.相关推荐

  1. Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resour

    搭建ssm框架练习,系统启动不起来 问题:事务管理器读不到mysql的数据源 解决:设置idea的警告级别,调到最低,如图 问题:运行时报错(问题的先后忘了,差不多就是这三个): Acquisitio ...

  2. Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire

    今天调试一个老的项目出现了这个问题, Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire ...

  3. 警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@120ced4c -- Acquisition Attempt Failed

    警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@120ced4c -- Acquisition Attempt Failed ...

  4. 警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@40bb7f0a -- Acquisition Attempt Failed

    警告: com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@40bb7f0a – Acquisition Attempt Failed! ...

  5. com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@4e47db1f -- Acquisition Attempt Failed!!!

    在maven中spring配置c3p0遇到的问题,其它地方遇到解决思路一致,如下: 1.检查四个参数是否有问题,注意大小写 2.检查数据库是否开启 3.检查是否导入了mysql-connector-j ...

  6. dial tcp xxx: connectex: A connection attempt failed

    问题 go: github.com/at-wat/ebml-go@v0.16.0: Get "https://proxy.golang.org/github.com/at-wat/ebml- ...

  7. GO connectex: A connection attempt failed because the connected party did not properly respond 已解决

    一.问题 用 go build 创建项目,拉取go第三方扩展包的时候报如下错误: dial tcp 142.251.43.17:443: connectex: A connection attempt ...

  8. 拉起Docker容器初始化数据源时,报:org.postgresql.util.PSQLException: The connection attempt failed. 的解决办法

    问题概述 关于这个问题,博主是在进行容器化部署的时候遇到的, 这个问题,说是问题又不是问题,为了紧贴单位的发展战略及发展文化方针,给单位培养人才,先大胆的让同事先尝试着操作,最后出现问题了,博主就出场 ...

  9. A connection attempt failed because the connected party did not properly respond after a period of……

    在vscode中安装GO语言相关插件的时候,报错: A connection attempt failed because the connected party did not properly r ...

最新文章

  1. ibatis基础(三):查询指定id的单个对象
  2. python的应用领域-Python的应用领域
  3. [蓝桥杯][算法提高VIP]密码锁(BFS)
  4. cmd小游戏_使用pygame制作Flappy bird小游戏
  5. java中update_Java 7 Update 21安全改进的详细信息
  6. 四川大学计算机学硕分数线,川大计算机考研分数线
  7. Win10如何关闭管理员权限运行
  8. Qt中实现鼠标作图并且控制每一笔粗细和颜色的方法
  9. FTP服务器的安装与配置
  10. 安装php-solr扩展
  11. ios开发-教程选择
  12. python解决Unicode编码问题比如\xE6\x9F\xB3\xE4\xBA\x91
  13. DAY 10 | 自学前端第十天
  14. 【在线研讨会-倒计时】12月12日Softing工业物联网解决方案 助力工业4.0
  15. HG30-3B型多功能校准仪
  16. 计算机绘图员证有无取消,计算机辅助设计
  17. 哈工大机器人章丘_重磅!哈工大机器人、华侨城、明水古城……章丘区春季开工16个项目,总投资1000亿元...
  18. mysql存储过程if exists_窥探mysql存储过程细节
  19. C++ 寻找完数 | Java 完数
  20. mysql兼容微信表情

热门文章

  1. PS磨皮教程系列一:什么叫磨皮以及什么适合磨皮
  2. Windows 11 笔记本电脑打开盖子无法立刻唤醒
  3. OpenWrt -【记录】群辉NAS上安装软路由
  4. 鲑鱼和金枪鱼罐头的全球与中国市场2022-2028年:技术、参与者、趋势、市场规模及占有率研究报告
  5. 计算机毕业设计之仿12306火车票购票平台
  6. Zynq笔记(一) —PL端(FPGA部分)的设计流程
  7. 人机博弈小游戏(Java)
  8. linux boot分区创建,Linux 更换 Boot分区 磁盘 示例
  9. Tesla™ GPU高性能计算应用案例
  10. Linux下的多线程編程