Hi,
I am trying to configure a type4 oracle datasource on WAS V6.0.X.
The oracle setup is a 9i RAC with two nodes and connectivity has to be achieved through a LDAP server (Oracle Internet Directory).
Type2 Datasource on WAS
-------------------------------
URL - jdbc:oracle:oci:@<service_name>
through LDAP using ldap.ora in Oracle thick client
DB username and password configured thru JAAS
Result - Works fine
Type4 Datasource on WAS
-------------------------------
URL - jdbc:oracle:thin:@ldap://<ldap_host>:389/<service_name>,cn=OracleContext,dc=<directorycontext from ldap.ora>
DB username and password configured thru JAAS
Result -
javax.management.RuntimeMBeanException: null nested runtime exception is java.util.NoSuchElementException
Type2 standalone client
----------------------------
Works fine as I am able to connect
Type4 standalone client
----------------------------
Through the same LDAP server and got the following exception -
java.util.NoSuchElementException
at java.util.Vector.firstElement(Vector.java:446)
at oracle.net.resolver.AddrResolution.<init>(Unknown Source)
at oracle.net.ns.NSProtocol.connect(Unknown Source)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:856)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:268)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:439)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at TestConn.main(TestConn.java:19)
Looking at the above stack trace, I believe that connection to LDAP server is failing. Is it because I have to use different login credentials to lookup LDAP (OID)? (currently I am using the username and password of the db instance)
Or is there something else that I am missing?
Help on this issue is highly appreciated.
Regards,
Vikas