-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HikariCP Can not get username config in jdbc.properties #133
Comments
That is truly strange. HikariCP has no code to access a user name other than what is specified in properties. Can you enable debug logging? When debug logging is turned on, HikariCP should log all of the pool parameters when the pool starts. |
this is debug log 2014-08-15 13:31:39.296 [main] DEBUG org.mybatis.spring.mapper.ClassPathMapperScanner - Ignored because not a concrete top-level class: file [E:\Repositories\workspace\idea\spring-demo\target\test-classes\yl\codecraft\spring\demo\mapper\OrderMapperTest.class] |
The log shows you have the following datasource properties set (somewhere);
Which shows |
I think to find why 。 I have a jdbc.properties, in spring Configuration file ,write this this key is username , change username to db.username . everthing is ok . thinks |
I meet a strange question!
My work OS : win7
server centos 6.4
jdk: 1.7
db: mysql
my project build by Spring 3.2.3.RELEASE+ mybatis 3.2.5 maven .
pom.xml
applicationContext.xml
when i run project at win7 OS. this is error
Caused by: java.sql.SQLException: Access denied for user 'yanliang'@'192.168.203.1' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1078)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4190)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4122)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:927)
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4689)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1304)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2486)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2519)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304)
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:834)
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)
at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
at com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:443)
at com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:141)
at com.mysql.jdbc.jdbc2.optional.MysqlDataSource.getConnection(MysqlDataSource.java:111)
at com.zaxxer.hikari.pool.HikariPool.addConnection(HikariPool.java:399)
at com.zaxxer.hikari.pool.HikariPool.access$400(HikariPool.java:64)
at com.zaxxer.hikari.pool.HikariPool$1AddConnection.run(HikariPool.java:316)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
while ,yanliang is my win7 user, 192.168.203.1 is win7 ip .
but run code at server, no error .
why HikariCP get my system login user to connect Remote db?
The text was updated successfully, but these errors were encountered: