2017-02-21 310 views
0

的设置很简单:ORA-01005:给出的空密码;登录使用充气城堡作为安全提供时否认

  • BC-FIPS-1.0.0.jar和bcpkix-FIPS-1.0.0.jar安全提供
  • Oracle JDBC驱动程序版本12.1.0.2
  • 服务器:Oracle数据库12c的标准版12.1.0.2.0

应用:

Security.addProvider(new BouncyCastleFipsProvider()); 
Class.forName("oracle.jdbc.driver.OracleDriver"); 
Connection connection = DriverManager.getConnection("jdbc:oracle:thin:@host:1521:db","user","pass"); 
connection.close(); 

例外:

java.sql.SQLException: ORA-01005: null password given; logon denied 

at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450) 
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:392) 
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:385) 
at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:1018) 
at oracle.jdbc.driver.T4CTTIoauthenticate.processError(T4CTTIoauthenticate.java:501) 
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:522) 
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:257) 
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:437) 
at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(T4CTTIoauthenticate.java:954) 
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:639) 
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:666) 
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32) 
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:566) 
at java.sql.DriverManager.getConnection(DriverManager.java:664) 
at java.sql.DriverManager.getConnection(DriverManager.java:247) 
at Main.main(Main.java:56) 

任何想法?

+0

与bouncycastle的关系是什么? – Egl

+0

好吧,我真的不知道,但它是唯一添加到代码,它失败。我看不到整个图片 –

+0

您是否试过了-Doracle.jdbc.thinLogonCapability = o3,如http://stackoverflow.com/questions/38609280/java-sql-sqlexception-ora-01005-null-password-given -logon-denied? – Egl

回答

0

与此同时,我们发现该错误仅使用JDBC驱动程序的版本12.1.0.2发生。

版本12.1.0.1正常工作!