--- ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java 2010-03-13 22:54:08.000000000 +0100 +++ ldap-client-api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java-gil 2012-03-12 15:07:42.610959428 +0100 @@ -36,7 +36,8 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; -import javax.naming.InvalidNameException; +import org.apache.directory.shared.ldap.exception.LdapInvalidDnException; +//import javax.naming.InvalidNameException; import javax.net.ssl.SSLContext; import org.apache.directory.ldap.client.api.exception.InvalidConnectionException; @@ -1184,7 +1185,7 @@ DN dn = new DN( searchRequest.getBaseDn() ); request.setBaseObject( dn ); } - catch ( InvalidNameException ine ) + catch ( LdapInvalidDnException ine ) { String msg = "The given dn '" + searchRequest.getBaseDn() + "' is not valid"; LOG.error( msg ); @@ -1273,7 +1274,7 @@ DN dn = new DN( bindRequest.getName() ); bindRequestCodec.setName( dn ); } - catch ( InvalidNameException ine ) + catch ( LdapInvalidDnException ine ) { String msg = "The given dn '" + bindRequest.getName() + "' is not valid"; LOG.error( msg ); @@ -2149,7 +2150,7 @@ { return rename( new DN( entryDn ), new RDN( newRdn ), deleteOldRdn ); } - catch ( InvalidNameException e ) + catch ( LdapInvalidDnException e ) { LOG.error( e.getMessage(), e ); throw new LdapException( e.getMessage(), e ); @@ -2188,7 +2189,7 @@ { return move( new DN( entryDn ), new DN( newSuperiorDn ) ); } - catch ( InvalidNameException e ) + catch ( LdapInvalidDnException e ) { LOG.error( e.getMessage(), e ); throw new LdapException( e.getMessage(), e ); @@ -2362,7 +2363,7 @@ return delete( deleteRequest ); } - catch ( InvalidNameException e ) + catch ( LdapInvalidDnException e ) { LOG.error( e.getMessage(), e ); throw new LdapException( e.getMessage(), e ); @@ -2439,7 +2440,7 @@ throw new LdapException( msg ); } } - catch ( InvalidNameException e ) + catch ( LdapInvalidDnException e ) { LOG.error( e.getMessage(), e ); throw new LdapException( e.getMessage(), e );