aspose file tools*
The moose likes Websphere and the fly likes WAS 6 datasource (type4) to connect to Oracle 9i RAC thru LDAP (OID) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "WAS 6 datasource (type4) to connect to Oracle 9i RAC thru LDAP (OID)" Watch "WAS 6 datasource (type4) to connect to Oracle 9i RAC thru LDAP (OID)" New topic
Author

WAS 6 datasource (type4) to connect to Oracle 9i RAC thru LDAP (OID)

vikas mallik
Greenhorn

Joined: Apr 28, 2008
Posts: 5
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 - jdbcracleci:@<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 - jdbcracle: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
Tim Ayo
Greenhorn

Joined: Nov 21, 2012
Posts: 1

Vikas, did you solve this issue you had in '09. I am working on an old app that is giving us same error.
Nag Ravipati
Greenhorn

Joined: Dec 08, 2012
Posts: 1
Any update on this?

We too had similar issue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WAS 6 datasource (type4) to connect to Oracle 9i RAC thru LDAP (OID)