Copy link to clipboard
Copied
ColdFusion 8,0,1,195765 Enterprise (Trial)
We use Oracle OID (LDAP) instead of tnsnames.ora to resolve database connection strings. This is how I specify one LDAP JDBC URL. On the CF admin page, Server Settings, Java and JVM, ColdFusion Class Path is set to C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar. Under Data & Services, Data Sources, create a new source. Set JDBC URL to
jdbc:oracle:thin:@ldap://mdaoid1.mycompany.com:389/mdad2,cn=OracleContext,dc=mycompany,dc=com
where mdaoid1 is one of the two Oracle OID servers that resolve connection strings, and mdad2 is an entry in the two OID's sync'ed to each other. That works.
According to many sources based on Google search for "space separated LDAP URLs", I should be able to add another LDAP server separated by space. Now I append " ldap://mdaoid2.mycompany.com:389/mdad2,cn=OracleContext,dc=mycompany,dc=com" (no quotes, added to indicate leading space) to that string. Upon clicking Submit, I get
Connection verification failed for data source: orcl10g3
java.sql.SQLException: For input string: "389 ldap:"
The root cause was that: java.sql.SQLException: For input string: "389 ldap:"
(orcl10g3 is the CF data source name I'm creating) Some say I need to replace space with %20 in the double LDAP URL. With %20, I get error
Connection verification failed for data source: orcl10g3
java.sql.SQLException: Io exception: JNDI Package failurejavax.naming.InvalidNameException: Invalid name: mdad2,cn=OracleContext,dc=mycompany,dc=com ldap://mdaoid2.mycompany.com:389
The root cause was that: java.sql.SQLException: Io exception: JNDI Package failurejavax.naming.InvalidNameException: Invalid name: mdad2,cn=OracleContext,dc=mycompany,dc=com ldap://mdaoid2.mycompany.com:389
Question: How do I add more than one LDAP server to the JDBC URL so I can achieve failover and load balance?
Yong Huang
yong321 at yahoo.com
Copy link to clipboard
Copied
The message above was posted by me two years ago and was brought to my attention today. Here's a short update: The network team added a load balancer mdaoid in front of, and resolved to, mdaoid1 and mdaoid2 (in round-robin fashion). The problem described in this thread is bypassed because the JDBC URL can simply use one-OID format, in which mdaoid is used as the LDAP server.