JDBC Glassfish 中的连接池 ping 错误

JDBC connection pool ping error in Glassfish

我正在尝试在 glassfish 5 中为 Microsoft SQL Server 数据库创建一个 jdbc 连接池。我正在使用 mssql-jdbc-6.2.2.jre8.jar 和最新的 SQLExpress 服务器版本 (MSSQL14.SQLEXPRESS)

资源类型:javax.sql.DataSource

数据源类名:com.microsoft.sqlserver.jdbc.SQLServerDataSource

连接池已成功创建,但当我尝试 ping 时,出现此错误:

Ping Connection Pool failed for sql_tire_pool. Connection could not be allocated because: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Unsupported curveId: 29". ClientConnectionId:f86f1ef8-29c4-4e39-b112-f5da9cbfe13d Please check the server.log for more details.

这是服务器日志:

[2017-10-11T10:55:11.747+0300] [glassfish 5.0] [WARNING] [test.connection.pool.failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=125 _ThreadName=admin-listener(7)] [timeMillis: 1507708511747] [levelValue: 900] [[ RAR8054: Exception while creating an unpooled [test] connection for pool [ test_pool ], Connection could not be allocated because: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Unsupported curveId: 29". ClientConnectionId:4c325981-4c97-4db2-b4fb-f7aafca4f03b]]

[2017-10-11T10:55:11.750+0300] [glassfish 5.0] [SEVERE] [] [org.glassfish.admingui] [tid: _ThreadID=51 _ThreadName=admin-listener(3)] [timeMillis: 1507708511750] [levelValue: 1000] [[ RestResponse.getResponse() gives FAILURE. endpoint = 'http://localhost:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=test_pool}']]

我 运行ning Windows 10 而且一切都在本地 运行ning(Glassfish 安装,SQL 服务器)

更新

使用已接受的答案的解决方案,部分问题 solved.The 连接池现在成功 ping 数据库,但我遇到了同样的问题,因为当我的应用程序尝试 运行 通过 jpa/hibernate.

查询

Glassfish 5Windows 10 上也面临这个问题,禁用椭圆曲线就可以了,只需添加:

-Dcom.sun.net.ssl.enableECC=false

到 glassfish JVM 选项并重新启动服务器。 在 glassfish 问题跟踪器上发布解决方法以帮助他们快速修复它