[英]ORA-28040: No matching authentication protocol exception when using groovy.sql package with oracle12c
I am trying to connect to oracle12c database using groovy.sql.Sql 我正在尝试使用groovy.sql.Sql连接到oracle12c数据库
Sql sql = Sql.newInstance('jdbc:oracle:thin:@'+hostName:port/serviceName, dbUser, dbPassword, 'oracle.jdbc.driver.OracleDriver')
and it returns 然后它回来了
java.sql.SQLException: ORA-28040: No matching authentication protocol
I guess, this is because of the dialect mismatch. 我猜,这是因为方言不匹配。
It works fine with oracle11g , but not with 12c . 它适用于oracle11g ,但不适用于12c 。 If it is a problem with dialect , how can we externally specify dialect to groovy.sql.Sql .
如果是方言的问题,我们如何从外部指定方言到groovy.sql.Sql 。 If not, what could be the problem/solution?
如果没有,可能是什么问题/解决方案?
I'm using ojdbc14 driver. 我正在使用ojdbc14驱动程序。
The ojdbc14
is a relatively old driver and that could be the problem. ojdbc14
是一个相对较老的驱动程序,这可能是问题所在。 I would recommend trying ojdbc6
and see if that fixes your problem. 我建议尝试
ojdbc6
,看看是否能解决你的问题。
Note that this appeared to fix a similar problem based on information in the comments in this SO question ORA-28040: No matching authentication protocol exception . 请注意,这似乎根据此SO问题ORA-28040中的注释中的信息修复了类似的问题:没有匹配的身份验证协议异常 。
Are you referring to the dialect that is normally configured in DataSource.groovy
? 你指的是通常在
DataSource.groovy
配置的方言吗? If so, this is irrelevant when creating an Sql
instance, because the dialect is only used by Hibernate/GORM. 如果是这样,这在创建
Sql
实例时无关紧要,因为方言仅由Hibernate / GORM使用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.