【发布时间】:2014-05-21 20:24:34
【问题描述】:
我在 glassfish 4 上遇到了非常奇怪的问题。如果我为我的 JDBC 连接池指定 wrong 用户名/密码并尝试 ping,我得到(如预期的那样):
An error has occurred
Ping Connection Pool failed for scrumkinPool. Connection could not be allocated because: FATAL: password authentication failed for user "notAnActualUser" Please check the server.log for more details.
如果我输入 real 用户名/密码,我会得到(NOT 预期):
An error has occurred Ping Connection Pool failed for scrumkinPool.
Connection could not be allocated because: FATAL: database "anActualUser" does not exist Please check the server.log for more details.
可以看出,glassfish 将“用户名”字段解释为“数据库名称”字段。 但如果我将“postgres”指定为用户名(内置超级用户角色),它会成功 ping。
请注意,在这两者之间它实际上可以正常工作,但后来又开始不正常了。
我使用的是 PostgreSQL 9.3 数据库。
【问题讨论】:
标签: java postgresql jdbc glassfish connection-pooling