Everyone,
Im using the Javaloader along with Oracle's LDAP Jar file
ldapjclnt10.jar.
I first started working with straight java and trying to setup a
connection using the connectionUtil.
That went fine. When i try to do the same thing calling the java in
CF i get errors..
Here is the CF code...using the javaloader
<cfset Util = loader.create("oracle.ldap.util.Util")>
<cfset ctx = loader.create
("oracle.ldap.util.jndi.ConnectionUtil").getDefaultDirCtx
(host,port,bindDN,bindPass)>
<cfset roc = loader.create("oracle.ldap.util.RootOracleContext").init
(ctx)>
<cfset sub = roc.getSubscriber(ctx,Util.IDTYPE_DEFAULT, JavaCast
("null",""), JavaCast("null",""))>
Running this code i get the following error..
oracle.ldap.util.UtilException: Error in resolving Oracle Context:
cn=OracleContext Not an instance of DirContext
It cannot create a subscriber because the ctx is throwing the above
error.
Looking at the JavaDocs. the ConnectionUtil returns a
javax.naming.ldap.InitialLdapContext
http://java.sun.com/j2se/1.5.0/docs/api/index.html?javax/naming/ldap/InitialLdapContext.html
Maybe this is where i dont have a good grasp at java, but doesnt the
IntialLdapContext implement a DirContext?
Can I cast the <cfset ctx... > line to be a DirContext with CF?
I shouldnt have to, but i cant get the ConnectionUtil() method to work
in CF.
If you look at this url..
http://download.oracle.com/docs/cd/B28196_01/idmanage.1014/b15997/java_ext.htm#CIHEEHAH
scroll down to 5.10 Example: Search for OracleAS Single Sign-On Login
Name
As you can see, the code connection code is what im trying to
implement with CF.
Any idea on this?