gpt4 book ai didi

grails - HikariCP-与Teradata集成

转载 作者:行者123 更新时间:2023-12-02 14:50:52 26 4
gpt4 key购买 nike

我正在尝试在Grails应用程序中将Teradata与HikariCP集成在一起,并遇到问题。我可以使用默认的Grails连接池或数据源以相同的配置连接到Teradata。
我也尝试调整连接超时。

使用的库:

Teradata:

runtime (group: 'com.teradata', name:'terajdbc4', version:'13.10.0.8')
runtime (group: 'com.teradata', name:'tdgssconfig', version:'13.10.0.8')

HikariCp:
compile (group: 'com.zaxxer', name: 'HikariCP-java6', version: '2.2.4')

使用的连接属性:
[logSql:false, loggingSql:true, dialect:org.hibernate.dialect.TeradataDialect,
driverClassName:com.teradata.jdbc.TeraDriver, username:userId, password:pwd,
url:jdbc:teradata://DBName, pooled:true,
properties:[initialSize:5, minIdle:1, maxIdle:5, maxActive:3, maxWait:2000,
maxAge:60000, minEvictableIdleTimeMillis:30000, timeBetweenEvictionRunsMillis:30000,
abandonWhenPercentageFull:50, numTestsPerEvictionRun:3, testOnBorrow:true,
testWhileIdle:true, testOnReturn:true, validationQuery:SELECT 1,
validationInterval:500], jndiName:[:], readOnly:[:], passwordEncryptionCodec:[:]]

错误日志:
TERAJDBC4 ERROR [HikariCP connection filler (pool HikariPool-0)] com.teradata.jdbc.jdbc_4.TDSession@5f045975 Connection to DBName
Tue May 05 17:20:50 CDT 2015 socket orig=DBName cid=247608ab sess=0 com.teradata.jdbc.jdbc_4.util.JDBCException:
[Teradata JDBC Driver] [TeraJDBC 13.10.00.08] [Error 1276] [SQLState 08S01] Exceeded login timeout for DBName
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:92)
at com.teradata.jdbc.jdbc_4.util.ErrorFactory.makeDriverJDBCException(ErrorFactory.java:67)
at com.teradata.jdbc.jdbc.ConnectionBase.checkRemainingLoginTime(ConnectionBase.java:81)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$Lookup.<init>(TDNetworkIOIF.java:168)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.connectToHost(TDNetworkIOIF.java:289)
at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF.<init>(TDNetworkIOIF.java:108)
at com.teradata.jdbc.jdbc_4.TDSession.getIO(TDSession.java:584)
at com.teradata.jdbc.jdbc.GenericStateController.<init>(GenericStateController.java:41)
at com.teradata.jdbc.jdbc.GenericLogonController.<init>(GenericLogonController.java:40)
at com.teradata.jdbc.jdbc_4.TDSession.<init>(TDSession.java:202)
at com.teradata.jdbc.jdbc_3.ifjdbc_4.TeraLocalConnection.<init>(TeraLocalConnection.java:99)
at com.teradata.jdbc.jdbc.ConnectionFactory.createConnection(ConnectionFactory.java:58)
at com.teradata.jdbc.TeraDriver.doConnect(TeraDriver.java:218)
at com.teradata.jdbc.TeraDriver.connect(TeraDriver.java:151)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:187)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:56)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:62)
at com.zaxxer.hikari.pool.HikariPool.addConnection(HikariPool.java:415)
at com.zaxxer.hikari.pool.HikariPool.access$400(HikariPool.java:73)
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)
Error | 2015-05-05 17:20:51,234 [HikariCP connection filler (pool HikariPool-0)] ERROR pool.HikariPool - JDBC4 Connection.isValid() method not supported, connection test query must be configured
Error | 2015-05-05 17:20:51,821 [HikariCP connection filler (pool HikariPool-0)] ERROR pool.HikariPool - JDBC4 Connection.isValid() method not supported, connection test query must be configured

最佳答案

我不确定这些连接属性是有效的还是无效的,但是它们肯定不是HikariCP属性。我建议启用DEBUG级别的日志记录,然后在启动时检查HikariCP记录的属性,以确保它们符合您的期望。

关于grails - HikariCP-与Teradata集成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30065906/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com