Quantcast
Channel: Question and Answer » oracle
Viewing all articles
Browse latest Browse all 717

What is LDAP JDBC url with username and password to connect using DriverManger.getConnection

$
0
0

I want to connect to LDAP server using JDBC with username and password using DriverManager.getConnection method. I have all the credentials using which I am able to connect to LDAP from Sql * Plus. But when I try to connect from JDBC code as shown below it is always saying the invalid credentials. The same credentials are working from Sql * plus.
It seems to me that, I am not providing the credentials in the right format.enter image description here Can anybody tell me how to connect to the LDAP.

Class.forName("oracle.jdbc.driver.OracleDriver:);
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@ldap://myserver:389/mydb,cn=OracleContex", "myusername", "mypassword");

Viewing all articles
Browse latest Browse all 717

Trending Articles