My Oracle Support Banner

JDBC Applications Fail With “ORA-1005: null password given; logon denied.” When Connecting With RAS User To The Database (Doc ID 2011794.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Database - Enterprise Edition - Version 12.1.0.1 to 12.1.0.2 [Release 12.1]
Information in this document applies to any platform.

Symptoms

Connecting to a database using a JDBC application with a Real Application Security(RAS) user fails with the following error: 

“ORA-1005: null password given; logon denied.”

 

 

BEGIN
 XS_PRINCIPAL.CREATE_USER
     (name       => 'john',
      schema     => 'HR');
END;
/


BEGIN
     XS_PRINCIPAL.SET_PASSWORD('john', 'john');
END;
/

conn / as sysdba 
create role db_role;
EXEC XS_PRINCIPAL.CREATE_ROLE(NAME => 'ras_role', ENABLED => TRUE);
grant select any table to db_role; 
grant db_role to ras_role; 
EXEC XS_PRINCIPAL.GRANT_ROLES('john','RAS_ROLE');


SQL> conn john/john
Connected.
SQL>
SQL>
SQL>
SQL> select count(*) from employees;

 COUNT(*)
----------
      107



Connecting with  SQL Developer using the same user yields this

 

 

Changes

 Passwords for RAS users are created with SHA2 hashes.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.