org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;
来源:互联网 发布:js 创建key value数组 编辑:程序博客网 时间:2024/05/16 19:39
今天在自建一个maven web项目,在进行测试的时候,报错,详细信息如下:
### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))### The error may exist in file [E:\work_pratise\happyrunning\happyrunning\target\classes\com\zxc\happy\mapping\UserMapper.xml]### The error may involve com.zxc.happy.dao.UserMapper.selectByPrimaryKey### The error occurred while executing a query### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password: YES))
网上遇到此问题的好多帖子,更多的是表示配置出问题,参考链接如下:
http://blog.csdn.net/liwuyang2013/article/details/25986597
http://blog.csdn.net/cool_easy/article/details/42913811
检查jdbc.properties的配置,路径以及用户密码都没有问题,驱动类jar包也有,后来仔细检查,发现在配置文件:
jdbc.driver=com.mysql.jdbc.Driverjdbc.url=jdbc:mysql://localhost:3306/running_man?useUnicode=true&characterEncoding=utf8jdbc.username=rootjdbc.password=rootjdbc.password=root后面有空格,这样就会报上述错误,而且在这四条配置中,若后面有空格,都会报上述错误
阅读全文
1 0
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection解决办法
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exc
- Oracle数据源:org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;
- Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nes
- Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection问题排查
- org.springframework.jdbc.CannotGetJdbcConnectionException
- Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could no
- org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for
- org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for
- Could not get JDBC Connection
- Could not get JDBC Connection
- Could not get JDBC Connection
- Could not get JDBC Connection
- Button 已经被点击
- 测试
- Arrays.asList解析
- jQuery源码阅读(八)---jQuery中的继承extend
- Android蓝牙4.0之玩爆智能穿戴、家具(二)【进阶篇】
- org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection;
- Ehcache配置参数详解
- 面向对象复习一
- TCP协议中的三次握手和四次挥手(图解)
- 常用设计模式之简单工厂模式
- 如何js正则表达式判断ip地址的合法性?
- 编程练习二维数组 java
- POJ-3281 Dining Dinic最大流
- codeforces 579D(35/600)