如 oracle文档中所述,我正在尝试在 glassfish 服务器中设置数据库。我的 JDK 版本是 1.8,glassfish 是 4.1。我正在使用 ojdbc7.jar。
我已将 ojdbc 放入 \glassfish\domains\domain1\lib\ext 文件夹并重新启动服务器和数据库。但是当我尝试 ping 时,出现错误:
Ping Connection Pool failed for TestPool. Connection could not be allocated because: IO Error: The Network Adapter could not establish the connection
在 server.log 我发现:
2015-04-13T18:35:25.413+0530] [glassfish 4.1] [WARNING] [test.connection.pool.failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=45 _ThreadName=admin-listener(2)] [timeMillis: 1428930325413] [levelValue: 900] [[
RAR8054: Exception while creating an unpooled [test] connection for pool [ TestPool ], Connection could not be allocated because: IO Error: The Network Adapter could not establish the connection]]
但我可以成功ping通默认在glassfish中的“Derby Pool”。我已经设置了文档中提到的所有连接池属性和 JVM 选项。
有人可以帮忙正确设置吗?
提前致谢。