admin管理员组文章数量:1356252
Recently upgraded oracle drivers from ojdbc8 to ojdbc17 and ucp17.jar, for tocmat server where a Java17 based application is deployed. But the database connection now showing following error. Other jars in classpath are
.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: UCP-0: Unable to start the Universal Connection Pool
at .springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:83)
at .springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:646)
at .springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: when l value specified, it must be less than bitlength(p)
at oracle.aso.DiffieHellman$DHJCEWrapper.getPublicKey(DiffieHellman.java:148)
at oracle.ano.DataIntegrityService.receiveServiceData(DataIntegrityService.java:253)
at oracle.ano.Service.receiveSelection(Service.java:360)
And the last caused by is :
Caused by: java.lang.IllegalArgumentException: when l value specified, it must be less than bitlength(p)
at .bouncycastle.crypto.params.DHParameters.<init>(Unknown Source)
at .bouncycastle.crypto.params.DHParameters.<init>(Unknown Source)
at .bouncycastle.jce.provider.JDKKeyPairGenerator$DH.initialize(Unknown Source)
at java.base/java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:436)
I had the old bouncy castle jar bcprov-jdk16:1.46. I upgraded it to bcprov-jdk18on. Still getting same error. Any help appreciated.
Recently upgraded oracle drivers from ojdbc8 to ojdbc17 and ucp17.jar, for tocmat server where a Java17 based application is deployed. But the database connection now showing following error. Other jars in classpath are
.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: UCP-0: Unable to start the Universal Connection Pool
at .springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:83)
at .springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:646)
at .springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:960)
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: when l value specified, it must be less than bitlength(p)
at oracle.aso.DiffieHellman$DHJCEWrapper.getPublicKey(DiffieHellman.java:148)
at oracle.ano.DataIntegrityService.receiveServiceData(DataIntegrityService.java:253)
at oracle.ano.Service.receiveSelection(Service.java:360)
And the last caused by is :
Caused by: java.lang.IllegalArgumentException: when l value specified, it must be less than bitlength(p)
at .bouncycastle.crypto.params.DHParameters.<init>(Unknown Source)
at .bouncycastle.crypto.params.DHParameters.<init>(Unknown Source)
at .bouncycastle.jce.provider.JDKKeyPairGenerator$DH.initialize(Unknown Source)
at java.base/java.security.KeyPairGenerator.initialize(KeyPairGenerator.java:436)
I had the old bouncy castle jar bcprov-jdk16:1.46. I upgraded it to bcprov-jdk18on. Still getting same error. Any help appreciated.
Share Improve this question asked Mar 28 at 13:18 YS_NEYS_NE 3466 silver badges22 bronze badges1 Answer
Reset to default 0This error comes from Bouncy Castle when initializing Diffie-Hellman parameters. This means that the initialization violates Diffie-Hellman spec.
This typically happens when there is:
Mismatched or outdated Bouncy Castle version
Conflict between multiple Bouncy Castle versions on the classpath
Invalid or unsupported Diffie-Hellman parameters passed from the Oracle driver or security layer
The steps that could help in a resolution of the error:
Ensure Bouncy Castle is updated properly
For Java 17 the recommended version isbcprov-jdk18on:1.78
or later.Ensure no other Bouncy Castle versions in classpath
Even if you've upgraded the Bouncy Castle version, there may be other versions in the classpath which may be loaded before the upgraded version thus causing the error.
Check
WEB-INF/lib
or anyclasspath
includes.
For Maven you can usemvn dependency:tree | grep bcprov
.Add required Oracle security jars:
oraclepki.jar
,osdt_cert.jar
,osdt_core.jar
You can download them from Oracle JDBC download page (Companion Jars)
本文标签:
版权声明:本文标题:java - after upgrading oracle driver ojdbc17 in tomcat server : SQLException: UCP-0: Unable to start the Universal Connection Po 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744035286a2579658.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论