KSQLException: The authentication type 10 is not supported.
Java应用使用人大金仓数据库启动时报错:
Caused by: com.kingbase8.util.KSQLException: The authentication type 10 is not supported. Check that you have configured the sys_hba.conf file to include the client's IP
address or subnet, and that it is using an authentication scheme supported by the driver.
at com.kingbase8.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:627)
at com.kingbase8.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:231)
at com.kingbase8.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)
at com.kingbase8.jdbc.KbConnection.<init>(KbConnection.java:202)
at com.kingbase8.Driver.makeConnection(Driver.java:486)
at com.kingbase8.Driver.connect(Driver.java:283)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:562)
报错提示不支持的认证类型。原因是使用了旧版的JDBC驱动包去连接新版本数据库,旧版驱动中缺少了某种认证类型。
解决方案:升级JDBC驱动
比如我这里是把kingbase-driver-8.2.0.jar替换为kingbase8-8.6.0.jar
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)