glassfish 4.0管理控制台连接池ping失败 [英] glassfish 4.0 admin console connection pool ping fails

查看:329
本文介绍了glassfish 4.0管理控制台连接池ping失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此错误:PostgreSQLPool的Ping连接池失败。无法分配连接,因为:致命:数据库 / localhost:5432 / mydatabase不存在

With this error: Ping Connection Pool failed for postgreSQLPool. Connection could not be allocated because: FATAL: database "/localhost:5432/mydatabase" does not exist

池配置如下:


Pool Name: postgreSQLPool 
Resource Type: javax.sql.ConnectionPoolDataSource
Datasource Classname: org.postgresql.ds.PGConnectionPoolDataSource
portNumber: 5432
databaseName: myDatabase
datasourceName: myDatabaseDS
roleName: myRole
networkProtocol: jdbc:postgresql:
serverName: //localhost
user: myUser
password: myPassword

Postgresql服务器正在运行,因为我可以使用与上面相同的连接值连接到数据库。

The postgresql server is running because I can connect to the database using the same connection values as above.

postgresql-9.3-1100.jdbc4.jar位于 $ glassfish_home / domains / domain1 / lib目录

postgresql-9.3-1100.jdbc4.jar is in $glassfish_home/domains/domain1/lib directory

任何帮助将不胜感激,

戴夫

推荐答案

您的池配置看起来很废话。 serverName 不应包含 // ,而 networkProtocol

Your pool configuration looks like nonsense. serverName should not have // in it and networkProtocol is not for the JDBC URL.

您的配置应如下所示:

Pool Name: postgreSQLPool 
portNumber: 5432
databaseName: myDatabase
datasourceName: myDatabaseDS
roleName: myRole
serverName: localhost
user: myUser
password: myPassword

(我不太确定必须或正确使用roleName datasourceName ,但没有时间进一步检查文档进行检查。

(I'm not at all sure that roleName or datasourceName are needed or correct, but don't have time to further review the documentation to check).

如果仍然有问题,请尝试使用基本数据源:

If you still have problems, try falling back to the basic data source:

Resource Type: javax.sql.DataSource
Datasource Classname: org.postgresql.ds.PGSimpleDataSource

有关信息有关资源类型,请参见 PGConnectionPoolDataSource ConnectionPoolDataSource

For info on the resource type, see PGConnectionPoolDataSource, ConnectionPoolDataSource.

请参阅:

  • the docs on the create-jdbc-connection-pool console command
  • this handy wiki entry for LifeRay which shows a sample config.

这篇关于glassfish 4.0管理控制台连接池ping失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆