directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r923747 [1/3] - in /directory/apacheds/trunk/core/src: main/java/org/apache/directory/server/core/ main/java/org/apache/directory/server/core/authn/ main/java/org/apache/directory/server/core/authz/ main/java/org/apache/directory/server/cor...
Date Tue, 16 Mar 2010 14:09:39 GMT
Author: kayyagari
Date: Tue Mar 16 14:09:38 2010
New Revision: 923747

URL: http://svn.apache.org/viewvc?rev=923747&view=rev
Log:
more classes updated to use the new exceptions

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AnonymousAuthenticator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/DefaultSchemaService.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaChecker.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryManager.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/schema/SchemaSubentryModifier.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/security/TlsKeyGenerator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/LdapClassLoader.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/StoredProcExecutionManager.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/java/LdapJavaStoredProcClassLoader.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/RefinementLeafEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubentryInterceptor.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/subtree/SubtreeEvaluator.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/AbstractStoredProcedureParameterInjector.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/AddStoredProcedureParameterInjector.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyDNStoredProcedureParameterInjector.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/ModifyStoredProcedureParameterInjector.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/SimpleTriggerExecutionAuthorizer.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerInterceptor.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/DummyAttributeTypeRegistry.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/DummyOidRegistry.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxValueCountFilterTest.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilterTest.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultCoreSession.java Tue Mar 16 14:09:38 2010
@@ -25,8 +25,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.changelog.LogChange;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -53,6 +51,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -185,7 +184,7 @@ public class DefaultCoreSession implemen
     }
 
     
-    private Value<?> convertToValue( String oid, Object value ) throws NamingException
+    private Value<?> convertToValue( String oid, Object value ) throws LdapException
     {
         Value<?> val = null;
         
@@ -204,7 +203,7 @@ public class DefaultCoreSession implemen
             }
             else
             {
-                throw new NamingException( I18n.err( I18n.ERR_309, oid ) );
+                throw new LdapException( I18n.err( I18n.ERR_309, oid ) );
             }
         }
         else
@@ -219,7 +218,7 @@ public class DefaultCoreSession implemen
             }
             else
             {
-                throw new NamingException( I18n.err( I18n.ERR_309, oid ) );
+                throw new LdapException( I18n.err( I18n.ERR_309, oid ) );
             }
         }
         

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultDirectoryService.java Tue Mar 16 14:09:38 2010
@@ -32,7 +32,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.UUID;
 
-import javax.naming.NamingException;
+import javax.naming.directory.Attributes;
 
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.authn.AuthenticationInterceptor;
@@ -85,6 +85,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
 import org.apache.directory.shared.ldap.ldif.ChangeType;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
@@ -855,7 +856,7 @@ public class DefaultDirectoryService imp
         {
             String message = I18n.err( I18n.ERR_77, revision );
             LOG.error( message );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
 
         return changeLog.getCurrentRevision();
@@ -869,7 +870,7 @@ public class DefaultDirectoryService imp
     
 
     /**
-     * @throws NamingException if the LDAP server cannot be started
+     * @throws Exception if the LDAP server cannot be started
      */
     public synchronized void startup() throws Exception
     {
@@ -1079,7 +1080,7 @@ public class DefaultDirectoryService imp
      * had to be created, then we are not starting for the first time.
      *
      * @return true if the bootstrap entries had to be created, false otherwise
-     * @throws javax.naming.NamingException if entries cannot be created
+     * @throws Exception if entries cannot be created
      */
     private boolean createBootstrapEntries() throws Exception
     {
@@ -1345,7 +1346,7 @@ public class DefaultDirectoryService imp
 
     /**
      * Displays security warning messages if any possible secutiry issue is found.
-     * @throws NamingException if there are failures parsing and accessing internal structures
+     * @throws Exception if there are failures parsing and accessing internal structures
      */
     private void showSecurityWarnings() throws Exception
     {
@@ -1380,7 +1381,7 @@ public class DefaultDirectoryService imp
      *
      * @todo this may no longer be needed when JNDI is not used for bootstrapping
      * 
-     * @throws NamingException if the creation of test entries fails.
+     * @throws Exception if the creation of test entries fails.
      */
     private void createTestEntries() throws Exception
     {
@@ -1412,7 +1413,7 @@ public class DefaultDirectoryService imp
     /**
      * Kicks off the initialization of the entire system.
      *
-     * @throws javax.naming.NamingException if there are problems along the way
+     * @throws Exception if there are problems along the way
      */
     private void initialize() throws Exception
     {
@@ -1517,7 +1518,7 @@ public class DefaultDirectoryService imp
                         oldAttribute.add( attribute.get() );
                         entry.put( oldAttribute );
                     }
-                    catch ( NamingException ne )
+                    catch ( LdapException ne )
                     {
                         // Do nothing
                     }
@@ -1528,7 +1529,7 @@ public class DefaultDirectoryService imp
                     {
                         entry.put( attribute );
                     }
-                    catch ( NamingException ne )
+                    catch ( LdapException ne )
                     {
                         // TODO do nothing ...
                     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DefaultOperationManager.java Tue Mar 16 14:09:38 2010
@@ -24,10 +24,7 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 
-import javax.naming.NamingException;
 import javax.naming.PartialResultException;
-import javax.naming.ReferralException;
-import javax.naming.ServiceUnavailableException;
 
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerEntry;
@@ -57,8 +54,10 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
+import org.apache.directory.shared.ldap.exception.LdapAffectMultipleDsaException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.exception.LdapReferralException;
+import org.apache.directory.shared.ldap.exception.LdapServiceUnavailableException;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
@@ -92,7 +91,7 @@ public class DefaultOperationManager imp
     
     
     private LdapReferralException buildReferralException( ServerEntry parentEntry, DN childDn ) 
-        throws NamingException, LdapURLEncodingException
+        throws LdapInvalidDnException, LdapURLEncodingException
     {
         // Get the Ref attributeType
         EntryAttribute refs = parentEntry.get( SchemaConstants.REF_AT );
@@ -118,9 +117,9 @@ public class DefaultOperationManager imp
         
         // Return with an exception
         LdapReferralException lre = new LdapReferralException( urls );
-        lre.setRemainingName( childDn );
-        lre.setResolvedName( parentEntry.getDn() );
-        lre.setResolvedObj( parentEntry );
+        //lre.setRemainingName( childDn );
+        //lre.setResolvedName( parentEntry.getDn() );
+        //lre.setResolvedObj( parentEntry );
         
         return lre;
     }
@@ -128,7 +127,7 @@ public class DefaultOperationManager imp
     
     private LdapReferralException buildReferralExceptionForSearch( 
         ServerEntry parentEntry, DN childDn, SearchScope scope ) 
-        throws NamingException, LdapURLEncodingException
+        throws LdapInvalidDnException, LdapURLEncodingException
     {
         // Get the Ref attributeType
         EntryAttribute refs = parentEntry.get( SchemaConstants.REF_AT );
@@ -189,9 +188,9 @@ public class DefaultOperationManager imp
         
         // Return with an exception
         LdapReferralException lre = new LdapReferralException( urls );
-        lre.setRemainingName( childDn );
-        lre.setResolvedName( parentEntry.getDn() );
-        lre.setResolvedObj( parentEntry );
+        //lre.setRemainingName( childDn );
+        //lre.setResolvedName( parentEntry.getDn() );
+        //lre.setResolvedObj( parentEntry );
         
         return lre;
     }
@@ -201,8 +200,8 @@ public class DefaultOperationManager imp
     {
         PartialResultException pre = new PartialResultException( I18n.err( I18n.ERR_315 ) );
         
-        pre.setRemainingName( childDn );
-        pre.setResolvedName( DN.EMPTY_DN );
+        //pre.setRemainingName( childDn );
+        //pre.setResolvedName( DN.EMPTY_DN );
         
         return pre;
     }
@@ -247,7 +246,7 @@ public class DefaultOperationManager imp
                     // Unlock the referral manager
                     directoryService.getReferralManager().unlock();
                     
-                    ReferralException exception = buildReferralException( parentEntry, childDn );
+                    LdapReferralException exception = buildReferralException( parentEntry, childDn );
                     throw exception;
                 }
             }
@@ -331,7 +330,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -351,7 +350,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -410,7 +409,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -432,7 +431,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -656,7 +655,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -678,7 +677,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -739,7 +738,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -761,7 +760,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -780,8 +779,8 @@ public class DefaultOperationManager imp
                 // Unlock the referral manager
                 directoryService.getReferralManager().unlock();
 
-                LdapNamingException exception = new LdapNamingException( ResultCodeEnum.AFFECTS_MULTIPLE_DSAS );
-                exception.setRemainingName( dn );
+                LdapAffectMultipleDsaException exception = new LdapAffectMultipleDsaException();
+                //exception.setRemainingName( dn );
                 
                 throw exception;
             }
@@ -841,7 +840,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -863,7 +862,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -884,8 +883,8 @@ public class DefaultOperationManager imp
 
                 // The parent DN is a referral, we have to issue a AffectMultipleDsas result
                 // as stated by RFC 3296 Section 5.6.2
-                LdapNamingException exception = new LdapNamingException( ResultCodeEnum.AFFECTS_MULTIPLE_DSAS );
-                exception.setRemainingName( dn );
+                LdapAffectMultipleDsaException exception = new LdapAffectMultipleDsaException();
+                //exception.setRemainingName( dn );
                 
                 throw exception;
             }
@@ -955,7 +954,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -977,7 +976,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralException( parentEntry, childDn );
+                        LdapReferralException exception = buildReferralException( parentEntry, childDn );
                         throw exception;
                     }
                 }
@@ -1037,7 +1036,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralExceptionForSearch( parentEntry, childDn, opContext.getScope() );
+                        LdapReferralException exception = buildReferralExceptionForSearch( parentEntry, childDn, opContext.getScope() );
                         throw exception;
                     }
                 }
@@ -1059,7 +1058,7 @@ public class DefaultOperationManager imp
                         // Unlock the referral manager
                         directoryService.getReferralManager().unlock();
                         
-                        ReferralException exception = buildReferralExceptionForSearch( parentEntry, childDn, opContext.getScope() );
+                        LdapReferralException exception = buildReferralExceptionForSearch( parentEntry, childDn, opContext.getScope() );
                         throw exception;
                     }
                 }
@@ -1104,11 +1103,11 @@ public class DefaultOperationManager imp
     }
 
 
-    private void ensureStarted() throws ServiceUnavailableException
+    private void ensureStarted() throws LdapServiceUnavailableException
     {
         if ( ! directoryService.isStarted() )
         {
-            throw new ServiceUnavailableException( I18n.err( I18n.ERR_316 ) );
+            throw new LdapServiceUnavailableException( ResultCodeEnum.UNAVAILABLE, I18n.err( I18n.ERR_316 ) );
         }
     }
     

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/ReferralManagerImpl.java Tue Mar 16 14:09:38 2010
@@ -23,7 +23,6 @@ package org.apache.directory.server.core
 import java.util.Set;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
 
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 
 import org.apache.directory.server.core.entry.ServerEntry;
@@ -32,6 +31,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
@@ -128,7 +128,7 @@ public class ReferralManagerImpl impleme
         {
             ((DnBranchNode<ServerEntry>)referrals).add( entry.getDn(), entry );
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             // Do nothing
         }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AnonymousAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AnonymousAuthenticator.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AnonymousAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AnonymousAuthenticator.java Tue Mar 16 14:09:38 2010
@@ -20,8 +20,6 @@
 package org.apache.directory.server.core.authn;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
 import org.apache.directory.server.i18n.I18n;
@@ -50,7 +48,7 @@ public class AnonymousAuthenticator exte
      * If the context is not configured to allow anonymous connections,
      * this method throws a {@link javax.naming.NoPermissionException}.
      */
-    public LdapPrincipal authenticate( BindOperationContext opContext ) throws NamingException
+    public LdapPrincipal authenticate( BindOperationContext opContext ) throws LdapNoPermissionException
     {
         // We only allow Anonymous binds if the service allows them
         if ( getDirectoryService().isAllowAnonymousAccess() )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java Tue Mar 16 14:09:38 2010
@@ -444,7 +444,7 @@ public class AuthenticationInterceptor e
             // This is a case where the Bind request contains a DN, but no password.
             // We don't check the DN, we just return a UnwillingToPerform error
             // Cf RFC 4513, chap. 5.1.2
-            throw new LdapUnwillingToPerformException( "Cannot Bind for DN " + opContext.getDn().getName(), ResultCodeEnum.UNWILLING_TO_PERFORM );
+            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, "Cannot Bind for DN " + opContext.getDn().getName() );
         }
 
         Collection<Authenticator> authenticators = getAuthenticators( level.getName() );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java Tue Mar 16 14:09:38 2010
@@ -31,7 +31,6 @@ import java.util.HashSet;
 import java.util.Set;
 
 import javax.naming.Context;
-import javax.naming.NamingException;
 
 import org.apache.commons.collections.map.LRUMap;
 import org.apache.directory.server.core.LdapPrincipal;
@@ -190,7 +189,7 @@ public class SimpleAuthenticator extends
      * Get the password either from cache or from backend.
      * @param principalDN The DN from which we want the password
      * @return A byte array which can be empty if the password was not found
-     * @throws NamingException If we have a problem during the lookup operation
+     * @throws Exception If we have a problem during the lookup operation
      */
     private LdapPrincipal getStoredPassword( BindOperationContext opContext ) throws Exception
     {
@@ -587,7 +586,7 @@ public class SimpleAuthenticator extends
      * Local function which request the password from the backend
      * @param principalDn the principal to lookup
      * @return the credentials from the backend
-     * @throws NamingException if there are problems accessing backend
+     * @throws Exception if there are problems accessing backend
      */
     private byte[] lookupUserPassword( BindOperationContext opContext ) throws Exception
     {
@@ -620,7 +619,7 @@ public class SimpleAuthenticator extends
         {
             LOG.error( I18n.err( I18n.ERR_6, cause.getLocalizedMessage() ) );
             LdapAuthenticationException e = new LdapAuthenticationException( cause.getLocalizedMessage() );
-            e.setRootCause( e );
+            e.initCause( e );
             throw e;
         }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/AciAuthorizationInterceptor.java Tue Mar 16 14:09:38 2010
@@ -71,9 +71,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.Value;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.exception.LdapOperationErrorException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -337,7 +336,7 @@ public class AciAuthorizationInterceptor
             {
                 String msg = I18n.err( I18n.ERR_10, aciString );
                 LOG.error( msg, e );
-                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
+                throw new LdapOperationErrorException( msg );
             }
 
             tuples.addAll( item.toTuples() );
@@ -390,7 +389,7 @@ public class AciAuthorizationInterceptor
             {
                 String msg = I18n.err( I18n.ERR_11, aciString );
                 LOG.error( msg, e );
-                throw new LdapNamingException( msg, ResultCodeEnum.OPERATIONS_ERROR );
+                throw new LdapOperationErrorException( msg );
             }
 
             tuples.addAll( item.toTuples() );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/GroupCache.java Tue Mar 16 14:09:38 2010
@@ -26,7 +26,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 
 import org.apache.directory.server.constants.ServerDNConstants;
@@ -43,6 +42,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.OrNode;
@@ -96,7 +97,7 @@ public class GroupCache
      * Creates a static group cache.
      *
      * @param directoryService the directory service core
-     * @throws NamingException if there are failures on initialization 
+     * @throws LdapException if there are failures on initialization 
      */
     public GroupCache( CoreSession session ) throws Exception
     {
@@ -113,7 +114,7 @@ public class GroupCache
     }
 
 
-    private DN parseNormalized( String name ) throws NamingException
+    private DN parseNormalized( String name ) throws LdapException
     {
         DN dn = new DN( name );
         dn.normalize( normalizerMap );
@@ -180,7 +181,7 @@ public class GroupCache
      * @param entry the entry inspected for member attributes
      * @return the member attribute
      */
-    private EntryAttribute getMemberAttribute( ServerEntry entry ) throws NamingException
+    private EntryAttribute getMemberAttribute( ServerEntry entry ) throws LdapException
     {
         EntryAttribute oc = entry.get( SchemaConstants.OBJECT_CLASS_AT );
 
@@ -223,9 +224,9 @@ public class GroupCache
      *
      * @param memberSet the set of member Dns (Strings)
      * @param members the member attribute values being added
-     * @throws NamingException if there are problems accessing the attr values
+     * @throws LdapException if there are problems accessing the attr values
      */
-    private void addMembers( Set<String> memberSet, EntryAttribute members ) throws NamingException
+    private void addMembers( Set<String> memberSet, EntryAttribute members ) throws LdapException
     {
         for ( Value<?> value : members )
         {
@@ -237,7 +238,7 @@ public class GroupCache
             {
                 memberDn = parseNormalized( memberDn ).getNormName();
             }
-            catch ( NamingException e )
+            catch ( LdapException e )
             {
                 LOG.warn( "Malformed member DN in groupOf[Unique]Names entry.  Member not added to GroupCache.", e );
             }
@@ -252,9 +253,9 @@ public class GroupCache
      *
      * @param memberSet the set of normalized member DNs
      * @param members the set of member values
-     * @throws NamingException if there are problems accessing the attr values
+     * @throws LdapException if there are problems accessing the attr values
      */
-    private void removeMembers( Set<String> memberSet, EntryAttribute members ) throws NamingException
+    private void removeMembers( Set<String> memberSet, EntryAttribute members ) throws LdapException
     {
         for ( Value<?> value : members )
         {
@@ -265,7 +266,7 @@ public class GroupCache
             {
                 memberDn = parseNormalized( memberDn ).getNormName();
             }
-            catch ( NamingException e )
+            catch ( LdapException e )
             {
                 LOG.warn( "Malformed member DN in groupOf[Unique]Names entry.  Member not removed from GroupCache.", e );
             }
@@ -281,9 +282,9 @@ public class GroupCache
      *
      * @param name the user provided name for the group entry
      * @param entry the group entry's attributes
-     * @throws NamingException if there are problems accessing the attr values
+     * @throws LdapException if there are problems accessing the attr values
      */
-    public void groupAdded( DN name, ServerEntry entry ) throws NamingException
+    public void groupAdded( DN name, ServerEntry entry ) throws LdapException
     {
         EntryAttribute members = getMemberAttribute( entry );
 
@@ -310,7 +311,7 @@ public class GroupCache
      * @param name the normalized DN of the group entry
      * @param entry the attributes of entry being deleted
      */
-    public void groupDeleted( DN name, ServerEntry entry ) throws NamingException
+    public void groupDeleted( DN name, ServerEntry entry ) throws LdapException
     {
         EntryAttribute members = getMemberAttribute( entry );
 
@@ -335,10 +336,10 @@ public class GroupCache
      * @param memberSet the set of members to be altered
      * @param modOp the type of modify operation being performed
      * @param members the members being added, removed or replaced
-     * @throws NamingException if there are problems accessing attribute values
+     * @throws LdapException if there are problems accessing attribute values
      */
     private void modify( Set<String> memberSet, ModificationOperation modOp, EntryAttribute members )
-        throws NamingException
+        throws LdapException
     {
 
         switch ( modOp )
@@ -373,10 +374,10 @@ public class GroupCache
      * @param name the normalized name of the group entry modified
      * @param mods the modification operations being performed
      * @param entry the group entry being modified
-     * @throws NamingException if there are problems accessing attribute  values
+     * @throws LdapException if there are problems accessing attribute  values
      */
     public void groupModified( DN name, List<Modification> mods, ServerEntry entry, SchemaManager schemaManager )
-        throws NamingException
+        throws LdapException
     {
         EntryAttribute members = null;
         String memberAttrId = null;
@@ -428,9 +429,9 @@ public class GroupCache
      * @param name the normalized name of the group entry modified
      * @param modOp the modify operation being performed
      * @param mods the modifications being performed
-     * @throws NamingException if there are problems accessing attribute  values
+     * @throws LdapException if there are problems accessing attribute  values
      */
-    public void groupModified( DN name, ModificationOperation modOp, ServerEntry mods ) throws NamingException
+    public void groupModified( DN name, ModificationOperation modOp, ServerEntry mods ) throws LdapException
     {
         EntryAttribute members = getMemberAttribute( mods );
 
@@ -485,9 +486,9 @@ public class GroupCache
      *
      * @param member the member (user) to get the groups for
      * @return a Set of Name objects representing the groups
-     * @throws NamingException if there are problems accessing attribute  values
+     * @throws LdapException if there are problems accessing attribute  values
      */
-    public Set<DN> getGroups( String member ) throws NamingException
+    public Set<DN> getGroups( String member ) throws LdapException
     {
         DN normMember;
 
@@ -495,7 +496,7 @@ public class GroupCache
         {
             normMember = parseNormalized( member );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             LOG
                 .warn(

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/TupleCache.java Tue Mar 16 14:09:38 2010
@@ -29,6 +29,7 @@ import java.util.Map;
 import java.util.Set;
 
 import javax.naming.NamingException;
+import javax.naming.directory.InvalidAttributeValueException;
 import javax.naming.directory.SearchControls;
 
 import org.apache.directory.server.core.CoreSession;
@@ -46,6 +47,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -103,7 +105,7 @@ public class TupleCache
     }
 
 
-    private DN parseNormalized( SchemaManager schemaManager, String name ) throws NamingException
+    private DN parseNormalized( SchemaManager schemaManager, String name ) throws LdapException
     {
         DN dn = new DN( name );
         dn.normalize( schemaManager.getNormalizerMapping() );
@@ -154,7 +156,7 @@ public class TupleCache
     }
 
 
-    private boolean hasPrescriptiveACI( ServerEntry entry ) throws NamingException
+    private boolean hasPrescriptiveACI( ServerEntry entry ) throws LdapException
     {
         // only do something if the entry contains prescriptiveACI
         EntryAttribute aci = entry.get( prescriptiveAciAT );
@@ -167,7 +169,7 @@ public class TupleCache
                 // should not be necessary because of schema interceptor but schema checking
                 // can be turned off and in this case we must protect against being able to
                 // add access control information to anything other than an AC subentry
-                throw new LdapSchemaViolationException( "", ResultCodeEnum.OBJECT_CLASS_VIOLATION );
+                throw new LdapSchemaViolationException( ResultCodeEnum.OBJECT_CLASS_VIOLATION, "" );
             }
             else
             {
@@ -179,7 +181,7 @@ public class TupleCache
     }
 
 
-    public void subentryAdded( DN normName, ServerEntry entry ) throws NamingException
+    public void subentryAdded( DN normName, ServerEntry entry ) throws LdapException
     {
         // only do something if the entry contains prescriptiveACI
         EntryAttribute aciAttr = entry.get( prescriptiveAciAT );
@@ -215,7 +217,7 @@ public class TupleCache
     }
 
 
-    public void subentryDeleted( DN normName, ServerEntry entry ) throws NamingException
+    public void subentryDeleted( DN normName, ServerEntry entry ) throws LdapException
     {
         if ( !hasPrescriptiveACI( entry ) )
         {
@@ -226,7 +228,7 @@ public class TupleCache
     }
 
 
-    public void subentryModified( DN normName, List<Modification> mods, ServerEntry entry ) throws NamingException
+    public void subentryModified( DN normName, List<Modification> mods, ServerEntry entry ) throws LdapException
     {
         if ( !hasPrescriptiveACI( entry ) )
         {
@@ -244,7 +246,7 @@ public class TupleCache
     }
 
 
-    public void subentryModified( DN normName, ServerEntry mods, ServerEntry entry ) throws NamingException
+    public void subentryModified( DN normName, ServerEntry mods, ServerEntry entry ) throws LdapException
     {
         if ( !hasPrescriptiveACI( entry ) )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedProtectedItemFilter.java Tue Mar 16 14:09:38 2010
@@ -40,6 +40,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -85,7 +86,7 @@ public class RelatedProtectedItemFilter 
             ServerEntry entry, 
             Collection<MicroOperation> microOperations,
             ServerEntry entryView )
-        throws NamingException
+        throws LdapException, NamingException
     {
         if ( tuples.size() == 0 )
         {
@@ -107,7 +108,7 @@ public class RelatedProtectedItemFilter 
 
 
     private boolean isRelated( ACITuple tuple, OperationScope scope, DN userName, DN entryName, String attrId,
-                               Value<?> attrValue, ServerEntry entry ) throws NamingException, InternalError
+                               Value<?> attrValue, ServerEntry entry ) throws LdapException, NamingException, InternalError
     {
         String oid = null;
         

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/RelatedUserClassFilter.java Tue Mar 16 14:09:38 2010
@@ -23,8 +23,6 @@ package org.apache.directory.server.core
 import java.util.Collection;
 import java.util.Iterator;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.interceptor.context.OperationContext;
 import org.apache.directory.server.core.subtree.SubtreeEvaluator;
@@ -34,6 +32,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.aci.UserClass;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
@@ -74,7 +73,7 @@ public class RelatedUserClassFilter impl
             ServerEntry entry, 
             Collection<MicroOperation> microOperations,
             ServerEntry entryView )
-        throws NamingException
+        throws LdapException
     {
         if ( tuples.size() == 0 )
         {
@@ -117,7 +116,7 @@ public class RelatedUserClassFilter impl
 
 
     private boolean isRelated( Collection<DN> userGroupNames, DN userName, ServerEntry userEntry, 
-        DN entryName, Collection<UserClass> userClasses ) throws NamingException
+        DN entryName, Collection<UserClass> userClasses ) throws LdapException
     {
         for ( UserClass userClass : userClasses )
         {
@@ -178,7 +177,7 @@ public class RelatedUserClassFilter impl
 
 
     private boolean matchUserClassSubtree( DN userName, ServerEntry userEntry, UserClass.Subtree subtree )
-        throws NamingException
+        throws LdapException
     {
         for ( SubtreeSpecification subtreeSpec : subtree.getSubtreeSpecifications() )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributesSchemaChecker.java Tue Mar 16 14:09:38 2010
@@ -35,6 +35,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeTypeException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
@@ -73,7 +74,7 @@ public class CollectiveAttributesSchemaC
             /*
              * TODO: Replace the Exception and the ResultCodeEnum with the correct ones.
              */
-            throw new LdapSchemaViolationException( I18n.err( I18n.ERR_241 ), ResultCodeEnum.OTHER );
+            throw new LdapSchemaViolationException( ResultCodeEnum.OTHER, I18n.err( I18n.ERR_241 ) );
         }
     }
     
@@ -95,12 +96,12 @@ public class CollectiveAttributesSchemaC
             /*
              * TODO: Replace the Exception and the ResultCodeEnum with the correct ones.
              */
-            throw new LdapSchemaViolationException( I18n.err( I18n.ERR_242 ), ResultCodeEnum.OTHER);
+            throw new LdapSchemaViolationException( ResultCodeEnum.OTHER, I18n.err( I18n.ERR_242 ));
         }
     }
     
     
-    private boolean addsAnyCollectiveAttributes( List<Modification> mods ) throws NamingException
+    private boolean addsAnyCollectiveAttributes( List<Modification> mods ) throws LdapException
     {
         for ( Modification mod:mods )
         {

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/configuration/AttributesPropertyEditor.java Tue Mar 16 14:09:38 2010
@@ -32,6 +32,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.client.DefaultClientEntry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.apache.directory.shared.ldap.ldif.LdifUtils;
 import org.apache.directory.shared.ldap.util.AttributeUtils;
@@ -124,7 +125,7 @@ public class AttributesPropertyEditor ex
                         oldAttribute.add( attribute.get() );
                         entry.put( oldAttribute );
                     }
-                    catch (NamingException ne)
+                    catch ( LdapException ne )
                     {
                         // Do nothing
                     }
@@ -135,7 +136,7 @@ public class AttributesPropertyEditor ex
                     {
                         entry.put( attribute );
                     }
-                    catch ( NamingException ne )
+                    catch ( LdapException ne )
                     {
                         // Do nothing...
                     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ExpressionEvaluator.java Tue Mar 16 14:09:38 2010
@@ -24,6 +24,8 @@ import javax.naming.NamingException;
 
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidSearchFilterException;
 import org.apache.directory.shared.ldap.filter.AndNode;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -95,7 +97,7 @@ public class ExpressionEvaluator impleme
     /**
      * @see Evaluator#evaluate(ExprNode, String, ServerEntry)
      */
-    public boolean evaluate( ExprNode node, String dn, ServerEntry entry ) throws NamingException
+    public boolean evaluate( ExprNode node, String dn, ServerEntry entry ) throws LdapException
     {
         if ( node.isLeaf() )
         {
@@ -137,11 +139,11 @@ public class ExpressionEvaluator impleme
                 return !evaluate( bnode.getFirstChild(), dn, entry );
             }
 
-            throw new NamingException( I18n.err( I18n.ERR_243, node ) );
+            throw new LdapInvalidSearchFilterException( I18n.err( I18n.ERR_243, node ) );
         }
         else
         {
-                throw new NamingException( I18n.err( I18n.ERR_244, bnode ) );
+                throw new LdapInvalidSearchFilterException( I18n.err( I18n.ERR_244, bnode ) );
         }
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/LeafEvaluator.java Tue Mar 16 14:09:38 2010
@@ -30,6 +30,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidSearchFilterException;
 import org.apache.directory.shared.ldap.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -107,7 +109,7 @@ public class LeafEvaluator implements Ev
     /**
      * @see Evaluator#evaluate(ExprNode, String, ServerEntry)
      */
-    public boolean evaluate( ExprNode node, String dn, ServerEntry entry ) throws NamingException
+    public boolean evaluate( ExprNode node, String dn, ServerEntry entry ) throws LdapException
     {
         if ( node instanceof ScopeNode )
         {
@@ -141,7 +143,7 @@ public class LeafEvaluator implements Ev
         }
         else
         {
-            throw new NamingException( I18n.err( I18n.ERR_245, node ) );
+            throw new LdapInvalidSearchFilterException( I18n.err( I18n.ERR_245, node ) );
         }
     }
 
@@ -155,11 +157,11 @@ public class LeafEvaluator implements Ev
      * @param isGreater true if it is a greater than or equal to comparison,
      *      false if it is a less than or equal to comparison.
      * @return the ava evaluation on the perspective candidate
-     * @throws javax.naming.NamingException if there is a database access failure
+     * @throws LdapException if there is a database access failure
      */
     @SuppressWarnings("unchecked")
     private boolean evalGreaterOrLesser( SimpleNode<?> node, ServerEntry entry, boolean isGreaterOrLesser )
-        throws NamingException
+        throws LdapException
     {
         String attrId = node.getAttribute();
 
@@ -225,7 +227,7 @@ public class LeafEvaluator implements Ev
      * @param entry the perspective candidate
      * @return the ava evaluation on the perspective candidate
      */
-    private boolean evalPresence( String attrId, ServerEntry entry ) throws NamingException
+    private boolean evalPresence( String attrId, ServerEntry entry ) throws LdapException
     {
         if ( entry == null )
         {
@@ -243,10 +245,10 @@ public class LeafEvaluator implements Ev
      * @param node the equality node to evaluate
      * @param entry the perspective candidate
      * @return the ava evaluation on the perspective candidate
-     * @throws javax.naming.NamingException if there is a database access failure
+     * @throws LdapException if there is a database access failure
      */
     @SuppressWarnings("unchecked")
-    private boolean evalEquality( EqualityNode<?> node, ServerEntry entry ) throws NamingException
+    private boolean evalEquality( EqualityNode<?> node, ServerEntry entry ) throws LdapException
     {
         Normalizer normalizer = getNormalizer( node.getAttribute() );
         Comparator comparator = getComparator( node.getAttribute() );
@@ -319,9 +321,9 @@ public class LeafEvaluator implements Ev
      *
      * @param attrId the attribute identifier
      * @return the comparator for equality matching
-     * @throws javax.naming.NamingException if there is a failure
+     * @throws LdapException if there is a failure
      */
-    private LdapComparator<? super Object> getComparator( String attrId ) throws NamingException
+    private LdapComparator<? super Object> getComparator( String attrId ) throws LdapException
     {
         MatchingRule mrule = getMatchingRule( attrId, EQUALITY_MATCH );
         return mrule.getLdapComparator();
@@ -333,9 +335,9 @@ public class LeafEvaluator implements Ev
      *
      * @param attrId the attribute identifier
      * @return the normalizer for equality matching
-     * @throws javax.naming.NamingException if there is a failure
+     * @throws LdapException if there is a failure
      */
-    private Normalizer getNormalizer( String attrId ) throws NamingException
+    private Normalizer getNormalizer( String attrId ) throws LdapException
     {
         MatchingRule mrule = getMatchingRule( attrId, EQUALITY_MATCH );
         return mrule.getNormalizer();
@@ -347,9 +349,9 @@ public class LeafEvaluator implements Ev
      *
      * @param attrId the attribute identifier
      * @return the matching rule
-     * @throws javax.naming.NamingException if there is a failure
+     * @throws LdapException if there is a failure
      */
-    private MatchingRule getMatchingRule( String attrId, int matchType ) throws NamingException
+    private MatchingRule getMatchingRule( String attrId, int matchType ) throws LdapException
     {
         MatchingRule mrule = null;
         AttributeType type = schemaManager.lookupAttributeTypeRegistry( attrId );
@@ -369,7 +371,7 @@ public class LeafEvaluator implements Ev
                 break;
 
             default:
-                throw new NamingException( I18n.err( I18n.ERR_246, matchType ) );
+                throw new LdapException( I18n.err( I18n.ERR_246, matchType ) );
         }
 
         if ( ( mrule == null ) && ( matchType != EQUALITY_MATCH ) )

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/ScopeEvaluator.java Tue Mar 16 14:09:38 2010
@@ -20,10 +20,10 @@
 package org.apache.directory.server.core.event;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidSearchFilterException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.ScopeNode;
 import org.apache.directory.shared.ldap.name.DN;
@@ -45,7 +45,7 @@ public class ScopeEvaluator implements E
     /**
      * @see Evaluator#evaluate(ExprNode , String, ServerEntry)
      */
-    public boolean evaluate( ExprNode node, String dn, ServerEntry record ) throws NamingException
+    public boolean evaluate( ExprNode node, String dn, ServerEntry record ) throws LdapException
     {
         ScopeNode snode = ( ScopeNode ) node;
 
@@ -66,7 +66,7 @@ public class ScopeEvaluator implements E
                 return dn.endsWith( snode.getBaseDn() );
             
             default:
-                throw new NamingException( I18n.err( I18n.ERR_247 ) );
+                throw new LdapInvalidSearchFilterException( I18n.err( I18n.ERR_247 ) );
         }
     }
 }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/event/SubstringEvaluator.java Tue Mar 16 14:09:38 2010
@@ -23,12 +23,12 @@ package org.apache.directory.server.core
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidSearchFilterException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SubstringNode;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -64,7 +64,7 @@ public class SubstringEvaluator implemen
     /**
      * @see Evaluator#evaluate( ExprNode, String, ServerEntry )
      */
-    public boolean evaluate( ExprNode node, String dn, ServerEntry entry ) throws NamingException
+    public boolean evaluate( ExprNode node, String dn, ServerEntry entry ) throws LdapException
     {
         Pattern regex = null;
         SubstringNode snode = (SubstringNode)node;
@@ -96,8 +96,8 @@ public class SubstringEvaluator implemen
         }
         catch ( PatternSyntaxException pse )
         {
-            NamingException ne = new NamingException( I18n.err( I18n.ERR_248, node ) );
-            ne.setRootCause( pse );
+            LdapInvalidSearchFilterException ne = new LdapInvalidSearchFilterException( I18n.err( I18n.ERR_248, node ) );
+            ne.initCause( pse );
             throw ne;
         }
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/exception/ExceptionInterceptor.java Tue Mar 16 14:09:38 2010
@@ -34,7 +34,6 @@ import org.apache.directory.server.core.
 import org.apache.directory.server.core.interceptor.context.AddOperationContext;
 import org.apache.directory.server.core.interceptor.context.DeleteOperationContext;
 import org.apache.directory.server.core.interceptor.context.EntryOperationContext;
-import org.apache.directory.server.core.interceptor.context.GetMatchedNameOperationContext;
 import org.apache.directory.server.core.interceptor.context.GetSuffixOperationContext;
 import org.apache.directory.server.core.interceptor.context.ListOperationContext;
 import org.apache.directory.server.core.interceptor.context.LookupOperationContext;
@@ -54,11 +53,11 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
 import org.apache.directory.shared.ldap.entry.Value;
+import org.apache.directory.shared.ldap.exception.LdapAliasException;
 import org.apache.directory.shared.ldap.exception.LdapAttributeInUseException;
 import org.apache.directory.shared.ldap.exception.LdapContextNotEmptyException;
 import org.apache.directory.shared.ldap.exception.LdapEntryAlreadyExistsException;
 import org.apache.directory.shared.ldap.exception.LdapNoSuchObjectException;
-import org.apache.directory.shared.ldap.exception.LdapNamingException;
 import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.DN;
@@ -146,7 +145,7 @@ public class ExceptionInterceptor extend
         if ( nextInterceptor.hasEntry( new EntryOperationContext( opContext.getSession(), name ) ) )
         {
             LdapEntryAlreadyExistsException ne = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_250, name.getName() ) );
-            ne.setResolvedName( new DN( name.getName() ) );
+            //ne.setResolvedName( new DN( name.getName() ) );
             throw ne;
         }
         
@@ -185,8 +184,8 @@ public class ExceptionInterceptor extend
             {
                 LdapNoSuchObjectException e2 = new LdapNoSuchObjectException( I18n.err( I18n.ERR_251, 
                     parentDn.getName() ) );
-                e2.setResolvedName( new DN( nexus.getMatchedName( 
-                    new GetMatchedNameOperationContext( opContext.getSession(), parentDn ) ).getName() ) );
+                //e2.setResolvedName( new DN( nexus.getMatchedName( 
+                  //  new GetMatchedNameOperationContext( opContext.getSession(), parentDn ) ).getName() ) );
                 throw e2;
             }
             
@@ -195,9 +194,8 @@ public class ExceptionInterceptor extend
             if ( objectClass.contains( SchemaConstants.ALIAS_OC ) )
             {
                 String msg = I18n.err( I18n.ERR_252, name.getName() );
-                ResultCodeEnum rc = ResultCodeEnum.ALIAS_PROBLEM;
-                LdapNamingException e = new LdapNamingException( msg, rc );
-                e.setResolvedName( new DN( parentDn.getName() ) );
+                LdapAliasException e = new LdapAliasException( msg );
+                //e.setResolvedName( new DN( parentDn.getName() ) );
                 throw e;
             }
             else
@@ -223,8 +221,8 @@ public class ExceptionInterceptor extend
         
         if ( name.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
-            throw new LdapUnwillingToPerformException( I18n.err( I18n.ERR_253, subschemSubentryDn ),
-                ResultCodeEnum.UNWILLING_TO_PERFORM );
+            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM,
+                I18n.err( I18n.ERR_253, subschemSubentryDn ) );
         }
         
         // check if entry to delete exists
@@ -245,7 +243,7 @@ public class ExceptionInterceptor extend
         if ( hasChildren )
         {
             LdapContextNotEmptyException e = new LdapContextNotEmptyException();
-            e.setResolvedName( new DN( name.getName() ) );
+            //e.setResolvedName( new DN( name.getName() ) );
             throw e;
         }
 
@@ -367,8 +365,8 @@ public class ExceptionInterceptor extend
         
         if ( dn.equals( subschemSubentryDn ) )
         {
-            throw new LdapUnwillingToPerformException( I18n.err( I18n.ERR_255, subschemSubentryDn,
-                subschemSubentryDn ), ResultCodeEnum.UNWILLING_TO_PERFORM );
+            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_255, subschemSubentryDn,
+                    subschemSubentryDn ) );
         }
         
         // Check to see if the renamed entry exists
@@ -378,7 +376,7 @@ public class ExceptionInterceptor extend
             // on the server
             LdapNoSuchObjectException ldnfe;
             ldnfe = new LdapNoSuchObjectException( I18n.err( I18n.ERR_256, dn.getName() ) );
-            ldnfe.setResolvedName( new DN( dn.getName() ) );
+            //ldnfe.setResolvedName( new DN( dn.getName() ) );
             throw ldnfe;
         }
         
@@ -389,7 +387,7 @@ public class ExceptionInterceptor extend
         {
             LdapEntryAlreadyExistsException e;
             e = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_257, newDn.getName() ) );
-            e.setResolvedName( new DN( newDn.getName() ) );
+            //e.setResolvedName( new DN( newDn.getName() ) );
             throw e;
         }
 
@@ -417,8 +415,8 @@ public class ExceptionInterceptor extend
         
         if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
-            throw new LdapUnwillingToPerformException( I18n.err( I18n.ERR_258, subschemSubentryDn,
-                subschemSubentryDn ), ResultCodeEnum.UNWILLING_TO_PERFORM );
+            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_258, subschemSubentryDn,
+                    subschemSubentryDn ) );
         }
         
         // check if child to move exists
@@ -443,7 +441,7 @@ public class ExceptionInterceptor extend
 
             LdapEntryAlreadyExistsException e;
             e = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_257, upTarget.getName() ) );
-            e.setResolvedName( new DN( upTarget.getName() ) );
+            //e.setResolvedName( new DN( upTarget.getName() ) );
             throw e;
         }
 
@@ -471,8 +469,8 @@ public class ExceptionInterceptor extend
 
         if ( oriChildName.getNormName().equalsIgnoreCase( subschemSubentryDn.getNormName() ) )
         {
-            throw new LdapUnwillingToPerformException( I18n.err( I18n.ERR_258, subschemSubentryDn,
-                subschemSubentryDn ), ResultCodeEnum.UNWILLING_TO_PERFORM );
+            throw new LdapUnwillingToPerformException( ResultCodeEnum.UNWILLING_TO_PERFORM, I18n.err( I18n.ERR_258, subschemSubentryDn,
+                    subschemSubentryDn ) );
         }
         
         // check if child to move exists
@@ -495,7 +493,7 @@ public class ExceptionInterceptor extend
 
             LdapEntryAlreadyExistsException e;
             e = new LdapEntryAlreadyExistsException( I18n.err( I18n.ERR_257, upTarget.getName() ) );
-            e.setResolvedName( new DN( upTarget.getName() ) );
+            //e.setResolvedName( new DN( upTarget.getName() ) );
             throw e;
         }
 
@@ -573,10 +571,10 @@ public class ExceptionInterceptor extend
                 e = new LdapNoSuchObjectException( dn.getName() );
             }
 
-            e.setResolvedName( 
-                new DN( 
-                    opContext.getSession().getDirectoryService().getOperationManager().getMatchedName( 
-                        new GetMatchedNameOperationContext( opContext.getSession(), dn ) ).getName() ) );
+            //e.setResolvedName( 
+            //    new DN( 
+            //        opContext.getSession().getDirectoryService().getOperationManager().getMatchedName( 
+            //            new GetMatchedNameOperationContext( opContext.getSession(), dn ) ).getName() ) );
             throw e;
         }
     }

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/ExpandingVisitor.java Tue Mar 16 14:09:38 2010
@@ -23,9 +23,8 @@ package org.apache.directory.server.core
 import java.util.Iterator;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.i18n.I18n;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.filter.ApproximateNode;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.EqualityNode;
@@ -170,7 +169,7 @@ public class ExpandingVisitor implements
                         }
                     }
                 }
-                catch ( NamingException e )
+                catch ( LdapException e )
                 {
                     // log something here and throw a runtime excpetion
                     throw new RuntimeException( I18n.err( I18n.ERR_261 ) );

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/normalization/FilterNormalizingVisitor.java Tue Mar 16 14:09:38 2010
@@ -23,10 +23,9 @@ package org.apache.directory.server.core
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.entry.Value;
 import org.apache.directory.shared.ldap.entry.client.ClientStringValue;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.filter.AndNode;
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
@@ -154,7 +153,7 @@ public class FilterNormalizingVisitor im
 
             return normalized;
         }
-        catch ( NamingException ne )
+        catch ( LdapException ne )
         {
             log.warn( "Failed to normalize filter value: {}", ne.getLocalizedMessage(), ne );
             return null;
@@ -169,7 +168,7 @@ public class FilterNormalizingVisitor im
      * @param node the node to visit
      * @return The visited node
      */
-    private ExprNode visitPresenceNode( PresenceNode node ) throws NamingException
+    private ExprNode visitPresenceNode( PresenceNode node ) throws LdapException
     {
         node.setAttribute( schemaManager.getAttributeTypeRegistry().getOidByName( node.getAttribute() ) );
         return node;
@@ -187,7 +186,7 @@ public class FilterNormalizingVisitor im
      * @param node the node to visit
      * @return the visited node
      */
-    private ExprNode visitSimpleNode( SimpleNode node ) throws NamingException
+    private ExprNode visitSimpleNode( SimpleNode node ) throws LdapException
     {
         // still need this check here in case the top level is a leaf node
         // with an undefined attributeType for its attribute
@@ -219,7 +218,7 @@ public class FilterNormalizingVisitor im
      * @param node the node to visit
      * @return the visited node
      */
-    private ExprNode visitSubstringNode( SubstringNode node ) throws NamingException
+    private ExprNode visitSubstringNode( SubstringNode node ) throws LdapException
     {
         // still need this check here in case the top level is a leaf node
         // with an undefined attributeType for its attribute
@@ -309,7 +308,7 @@ public class FilterNormalizingVisitor im
      * @param node the node to visit
      * @return the visited node
      */
-    private ExprNode visitExtensibleNode( ExtensibleNode node ) throws NamingException
+    private ExprNode visitExtensibleNode( ExtensibleNode node ) throws LdapException
     {
         node.setAttribute( schemaManager.getAttributeTypeRegistry().getOidByName( node.getAttribute() ) );
 
@@ -472,7 +471,7 @@ public class FilterNormalizingVisitor im
 	            return null;
 	        }
     	}
-    	catch( NamingException e )
+    	catch( LdapException e )
     	{
     		throw new RuntimeException( e );
     	}

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/operational/OperationalAttributeInterceptor.java Tue Mar 16 14:09:38 2010
@@ -212,7 +212,7 @@ public class OperationalAttributeInterce
                 // Wrong !
                 String message = I18n.err( I18n.ERR_30, SchemaConstants.ENTRY_UUID_AT );
                 LOG.error( message );
-                throw new LdapSchemaViolationException( message, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS );
+                throw new LdapSchemaViolationException( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS, message );
             }
         }
         else
@@ -227,7 +227,7 @@ public class OperationalAttributeInterce
                 // Wrong !
                 String message =  I18n.err( I18n.ERR_30, SchemaConstants.ENTRY_CSN_AT );
                 LOG.error( message );
-                throw new LdapSchemaViolationException( message, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS );
+                throw new LdapSchemaViolationException( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS, message );
             }
         }
         else
@@ -260,14 +260,14 @@ public class OperationalAttributeInterce
             {
                 String message = I18n.err( I18n.ERR_31 );
                 LOG.error( message );
-                throw new LdapSchemaViolationException( message, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS );
+                throw new LdapSchemaViolationException( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS, message );
             }
 
             if ( attributeType.equals( MODIFY_TIMESTAMP_ATTRIBUTE_TYPE ) )
             {
                 String message = I18n.err( I18n.ERR_32 );
                 LOG.error( message );
-                throw new LdapSchemaViolationException( message, ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS );
+                throw new LdapSchemaViolationException( ResultCodeEnum.INSUFFICIENT_ACCESS_RIGHTS, message );
             }
         }
         

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/PreferencesUtils.java Tue Mar 16 14:09:38 2010
@@ -20,10 +20,8 @@
 package org.apache.directory.server.core.prefs;
 
  
-import javax.naming.Name;
-import javax.naming.NamingException;
-
 import org.apache.directory.server.constants.ServerDNConstants;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.name.DN;
 
 
@@ -41,9 +39,9 @@ class PreferencesUtils
      *
      * @param absPrefPath the absolute path to the system preferences node
      * @return the distinguished name of the entry representing the system preferences node
-     * @throws NamingException if there are namespace problems while translating the path
+     * @throws LdapInvalidDnException if there are namespace problems while translating the path
      */
-    public static Name toSysDn( String absPrefPath ) throws NamingException
+    public static DN toSysDn( String absPrefPath ) throws LdapInvalidDnException
     {
         DN dn = new DN( ServerDNConstants.SYSPREFROOT_SYSTEM_DN );
 

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java?rev=923747&r1=923746&r2=923747&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java (original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/prefs/ServerSystemPreferences.java Tue Mar 16 14:09:38 2010
@@ -28,9 +28,6 @@ import java.util.prefs.AbstractPreferenc
 import java.util.prefs.BackingStoreException;
 import java.util.prefs.Preferences;
 
-import javax.naming.InvalidNameException;
-import javax.naming.NamingException;
-
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -44,6 +41,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.ModificationOperation;
+import org.apache.directory.shared.ldap.exception.LdapException;
+import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.name.DN;
 import org.apache.directory.shared.ldap.schema.AttributeType;
@@ -88,7 +87,7 @@ public class ServerSystemPreferences ext
         {
             dn = new DN( "prefNodeName=sysPrefRoot,ou=system" );
         }
-        catch ( InvalidNameException e )
+        catch ( LdapInvalidDnException e )
         {
             // never happens
         }
@@ -97,7 +96,7 @@ public class ServerSystemPreferences ext
     }
 
     
-    public void close() throws NamingException
+    public void close() throws LdapException
     {
     }
 
@@ -278,7 +277,7 @@ public class ServerSystemPreferences ext
             Modification mi = new ServerModification( ModificationOperation.REMOVE_ATTRIBUTE, attr );
             addDelta( mi );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             e.printStackTrace();
         }
@@ -352,7 +351,7 @@ public class ServerSystemPreferences ext
             Modification mi = new ServerModification( ModificationOperation.REPLACE_ATTRIBUTE, attr );
             addDelta( mi );
         }
-        catch ( NamingException e )
+        catch ( LdapException e )
         {
             e.printStackTrace();
         }



Mime
View raw message