[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Octetstring JDBC-LDAP Bridge



I'm going to be doing a check against active directory in a moment. 
just at first glance of your code, it seems that you are double
accessing the base dn.  IE: your base dn is DC=DSII but you are doing a
query on DC=DSII too.  In fact, in this case you would do just "SELECT
FROM ".  This will work (not including a base dn in the query when you
want to query the base dn of the connection).  One idea would be to try
your connection parameters in a jdbc tool like DbVisualizer or
ViennaSQL.

Marc

On Mon, 2003-07-14 at 11:07, Yen-Pin Wang wrote:
> Hi everyone:
> Does anybody have experience using this bridge?
> I checked the mailling list archive and it seems that everyone had the same problem.
> 
> Class.forName("com.octetstring.jdbcLdap.sql.JdbcLdapDriver");
> String sourceURL="jdbc:ldap://DSII.NET/DC=DSII?SEARCH_SCOPE:=subTreeScope";;
> java.sql.Connection con;
> con =DriverManager.getConnection(sourceURL,"CN=admin","password");
> stmt=con.createStatement();      
> rs = stmt.executeQuery("SELECT CN FROM DC=DSII");
>       		while(rs.next())
>       		{
>       			System.out.println(rs.getString("CN"));
>       		}								  
> javax.naming.PartialResultException: [LDAP: error code 10 - 0000202B: RefErr: DS
> ID-031006A4, data 0, 1 access points
>         ref 1: 'dsii.dsii'
> ]; remaining name 'DC=DSII'
> at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2699)
> at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2616)
> at com.sun.jndi.ldap.LdapCtx.c_lookup(LdapCtx.java:931)
> at com.sun.jndi.toolkit.ctx.ComponentContext.p_lookup(ComponentContext.j
> ava:522)
> ..................
> 
> I tried to use other baseDn like DC=DSII,DC=NET but the problem still there.
> 
> 
> 
> 
-- 
Marc Boorshtein, Software Engineer
Octet String Inc.
Phone: +1-847-466-1884
Email: marc.boorshtein@octetstring.com