My Oracle Support Banner

JDBC Thin Driver Connection Via Wallet and with LDAP Fails with ORA-1017 (Doc ID 2067207.1)

Last updated on AUGUST 22, 2018

Applies to:

JDBC - Version and later
Information in this document applies to any platform.


On : version, Thin JDBC driver

Java program using JDBC thin driver via wallet and with openLDAP or LDAP cannot connect to database.
An oracle external wallet authentication with mkstore has been set up to connect to the database without user/password. This setting works fine via Sql*Plus. However, when using JDBC, it throws an ORA-1017 invalid username/password.


java.sql.SQLException: ORA-01017: invalid username/password; logon denied

  at oracle.jdbc.driver.T4CTTIoer.processError(
  at oracle.jdbc.driver.T4CTTIoer.processError(
  at oracle.jdbc.driver.T4CTTIoer.processError(
  at oracle.jdbc.driver.T4CTTIfun.processError(
  at oracle.jdbc.driver.T4CTTIoauthenticate.processError(
  at oracle.jdbc.driver.T4CTTIfun.receive(
  at oracle.jdbc.driver.T4CTTIfun.doRPC(
  at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(
  at oracle.jdbc.driver.T4CTTIoauthenticate.doOAUTH(
  at oracle.jdbc.driver.T4CConnection.logon(
  at oracle.jdbc.driver.PhysicalConnection.connect(
  at oracle.jdbc.driver.T4CDriverExtension.getConnection(
  at oracle.jdbc.driver.OracleDriver.connect(
  at java.sql.DriverManager.getConnection(
  at java.sql.DriverManager.getConnection(
  at SecureExternalPassword.main(

The issue can be reproduced at will with the following steps:
1. Set up an Oracle external wallet authentication with mkstore to connect to the database without user/password.
2. Test the connection with SQL*Plus, which will work successfully.
3. Test the connection with JDBC using the LDAP entry on the URL (URL=jdbc:oracle:thin:/@ldap://,cn=OracleContext"). These will fail with the error.

The connection without LDAP (with TNS descriptor) works successfully:
String url = "jdbc:oracle:thin:/@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(";


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

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