directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r951097 [1/2] - in /directory/apacheds/trunk: core-annotations/src/main/java/org/apache/directory/server/core/factory/ core-api/src/main/java/org/apache/directory/server/core/ core-api/src/main/java/org/apache/directory/server/core/entry/ c...
Date Thu, 03 Jun 2010 18:23:19 GMT
Author: elecharny
Date: Thu Jun  3 18:23:18 2010
New Revision: 951097

URL: http://svn.apache.org/viewvc?rev=951097&view=rev
Log:
Demoved many NamingException from the server (either in Javadoc,or replaced them by LdapException)

Modified:
    directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
    directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
    directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
    directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java
    directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java
    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/authn/AbstractAuthenticator.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/ACDFEngine.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/authz/support/ACITupleFilter.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/changelog/MemoryChangeLogStore.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/collective/CollectiveAttributeInterceptor.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/sp/StoredProcEngine.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/sp/java/JavaStoredProcEngine.java
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/trigger/TriggerSpecCache.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/authz/support/MaxImmSubFilterTest.java
    directory/apacheds/trunk/core/src/test/java/org/apache/directory/server/core/interceptor/InterceptorChainTest.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/bind/AbstractSaslCallbackHandler.java
    directory/apacheds/trunk/protocol-shared/src/main/java/org/apache/directory/server/protocol/shared/store/LdifFileLoader.java

Modified: directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java (original)
+++ directory/apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java Thu Jun  3 18:23:18 2010
@@ -25,8 +25,6 @@ import java.io.InputStream;
 import java.lang.reflect.Method;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.annotations.ApplyLdifFiles;
 import org.apache.directory.server.core.annotations.ApplyLdifs;
@@ -41,6 +39,7 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.server.xdbm.GenericIndex;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.junit.runner.Description;
@@ -241,7 +240,7 @@ public class DSAnnotationProcessor
      * @param service the DirectoryService
      * @throws Exception
      */
-    private static void injectEntry( LdifEntry entry, DirectoryService service ) throws Exception
+    private static void injectEntry( LdifEntry entry, DirectoryService service ) throws LdapException
     {
         if ( entry.isChangeAdd() )
         {
@@ -254,7 +253,7 @@ public class DSAnnotationProcessor
         else
         {
             String message = I18n.err( I18n.ERR_117, entry.getChangeType() );
-            throw new NamingException( message );
+            throw new LdapException( message );
         }
     }
 
@@ -299,7 +298,7 @@ public class DSAnnotationProcessor
      *
      * @param service the directory service to use 
      * @param ldif the ldif containing entries to add to the server.
-     * @throws NamingException if there is a problem adding the entries from the LDIF
+     * @throws Exception if there is a problem adding the entries from the LDIF
      */
     public static void injectEntries( DirectoryService service, String ldif ) throws Exception
     {

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/CoreSession.java Thu Jun  3 18:23:18 2010
@@ -31,6 +31,7 @@ import org.apache.directory.server.core.
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.filter.SearchScope;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
@@ -205,7 +206,7 @@ public interface CoreSession
      * @param entry the entry to add
      * @exception Exception on failures to add the entry
      */
-    void add( Entry entry ) throws Exception;
+    void add( Entry entry ) throws LdapException;
     
     
     /**
@@ -215,7 +216,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @exception Exception on failures to add the entry
      */
-    void add( Entry entry, LogChange log ) throws Exception;
+    void add( Entry entry, LogChange log ) throws LdapException;
     
     
     /**
@@ -227,7 +228,7 @@ public interface CoreSession
      * @param ignoreReferral a flag to tell the server to ignore referrals
      * @exception Exception on failures to add the entry
      */
-    void add( Entry entry, boolean ignoreReferral ) throws Exception;
+    void add( Entry entry, boolean ignoreReferral ) throws LdapException;
     
     
     /**
@@ -240,7 +241,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @exception Exception on failures to add the entry
      */
-    void add( Entry entry, boolean ignoreReferral, LogChange log ) throws Exception;
+    void add( Entry entry, boolean ignoreReferral, LogChange log ) throws LdapException;
     
     
     /**
@@ -250,7 +251,7 @@ public interface CoreSession
      * @param InternalAddRequest the request to execute
      * @exception Exception on failures to add the entry
      */
-    void add( InternalAddRequest addRequest ) throws Exception;
+    void add( InternalAddRequest addRequest ) throws LdapException;
     
     
     /**
@@ -261,7 +262,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @exception Exception on failures to add the entry
      */
-    void add( InternalAddRequest addRequest, LogChange log ) throws Exception;
+    void add( InternalAddRequest addRequest, LogChange log ) throws LdapException;
     
     
     /**
@@ -272,7 +273,7 @@ public interface CoreSession
      * @param value the value to check for
      * @throws Exception if there are failures while comparing
      */
-    boolean compare( DN dn, String oid, Object value ) throws Exception;
+    boolean compare( DN dn, String oid, Object value ) throws LdapException;
     
     
     /**
@@ -286,7 +287,7 @@ public interface CoreSession
      * @param ignoreReferral a flag to tell the server to ignore referrals
      * @throws Exception if there are failures while comparing
      */
-    boolean compare( DN dn, String oid, Object value, boolean ignoreReferral ) throws Exception;
+    boolean compare( DN dn, String oid, Object value, boolean ignoreReferral ) throws LdapException;
     
     
     /**
@@ -295,7 +296,7 @@ public interface CoreSession
      * @param compareRequest the received request
      * @throws Exception if there are failures while comparing
      */
-    boolean compare( InternalCompareRequest compareRequest ) throws Exception;
+    boolean compare( InternalCompareRequest compareRequest ) throws LdapException;
 
     
     /**
@@ -304,7 +305,7 @@ public interface CoreSession
      * @param dn the distinguished name of the entry to delete
      * @throws Exception if there are failures while deleting the entry
      */
-    void delete( DN dn ) throws Exception;
+    void delete( DN dn ) throws LdapException;
 
     
     /**
@@ -314,13 +315,13 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @throws Exception if there are failures while deleting the entry
      */
-    void delete( DN dn, LogChange log ) throws Exception;
+    void delete( DN dn, LogChange log ) throws LdapException;
     
     
-    void delete( InternalDeleteRequest deleteRequest ) throws Exception;
+    void delete( InternalDeleteRequest deleteRequest ) throws LdapException;
     
     
-    void delete( InternalDeleteRequest deleteRequest, LogChange log ) throws Exception;
+    void delete( InternalDeleteRequest deleteRequest, LogChange log ) throws LdapException;
 
     
     /**
@@ -332,7 +333,7 @@ public interface CoreSession
      * @param ignoreReferral a flag to tell the server to ignore referrals
      * @throws Exception if there are failures while deleting the entry
      */
-    void delete( DN dn, boolean ignoreReferral ) throws Exception;
+    void delete( DN dn, boolean ignoreReferral ) throws LdapException;
     
     
     /**
@@ -345,13 +346,13 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @throws Exception if there are failures while deleting the entry
      */
-    void delete( DN dn, boolean ignoreReferral, LogChange log ) throws Exception;
+    void delete( DN dn, boolean ignoreReferral, LogChange log ) throws LdapException;
     
     
     /**
      * Checks to see if an entry exists. 
      */
-    boolean exists( DN dn ) throws Exception;
+    boolean exists( DN dn ) throws LdapException;
     
     
     /**
@@ -361,7 +362,7 @@ public interface CoreSession
      * @param dn the name of the entry to lookup
      * @throws Exception if there are failures while looking up the entry
      */
-    Entry lookup( DN dn ) throws Exception;
+    Entry lookup( DN dn ) throws LdapException;
 
     /**
      * Looks up an entry in the server returning all attributes: both user and
@@ -371,7 +372,7 @@ public interface CoreSession
      * @param atIds The list of attributes to return
      * @throws Exception if there are failures while looking up the entry
      */
-    Entry lookup( DN dn, String[] atIds ) throws Exception;
+    Entry lookup( DN dn, String[] atIds ) throws LdapException;
 
     
     /**
@@ -382,7 +383,7 @@ public interface CoreSession
      * @param mods the list of modifications to apply
      * @throws Exception if there are failures while modifying the entry
      */
-    void modify( DN dn, List<Modification> mods ) throws Exception;
+    void modify( DN dn, List<Modification> mods ) throws LdapException;
     
     
     /**
@@ -394,7 +395,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @throws Exception if there are failures while modifying the entry
      */
-    void modify( DN dn, List<Modification> mods, LogChange log ) throws Exception;
+    void modify( DN dn, List<Modification> mods, LogChange log ) throws LdapException;
     
     
     /**
@@ -408,7 +409,7 @@ public interface CoreSession
      * @param mods the list of modifications to apply
      * @throws Exception if there are failures while modifying the entry
      */
-    void modify( DN dn, List<Modification> mods, boolean ignoreReferral ) throws Exception;
+    void modify( DN dn, List<Modification> mods, boolean ignoreReferral ) throws LdapException;
     
     
     /**
@@ -423,13 +424,13 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @throws Exception if there are failures while modifying the entry
      */
-    void modify( DN dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws Exception;
+    void modify( DN dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws LdapException;
     
     
-    void modify( InternalModifyRequest modifyRequest ) throws Exception;
+    void modify( InternalModifyRequest modifyRequest ) throws LdapException;
     
     
-    void modify( InternalModifyRequest modifyRequest, LogChange log ) throws Exception;
+    void modify( InternalModifyRequest modifyRequest, LogChange log ) throws LdapException;
 
     
     /**
@@ -440,7 +441,7 @@ public interface CoreSession
      * @param newParent the new parent under which the entry/branch is moved
      * @exception if there are failures while moving the entry/branch
      */
-    void move( DN dn, DN newParent ) throws Exception;
+    void move( DN dn, DN newParent ) throws LdapException;
     
     
     /**
@@ -452,7 +453,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @exception if there are failures while moving the entry/branch
      */
-    void move( DN dn, DN newParent, LogChange log ) throws Exception;
+    void move( DN dn, DN newParent, LogChange log ) throws LdapException;
     
     
     /**
@@ -477,7 +478,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @exception if there are failures while moving the entry/branch
      */
-    void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws Exception;
+    void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws LdapException;
     
     
     /**
@@ -486,7 +487,7 @@ public interface CoreSession
      * @param modifyDnRequest The ModifyDN request
      * @throws Exception if there are failures while moving the entry/branch
      */
-    void move( InternalModifyDnRequest modifyDnRequest ) throws Exception;
+    void move( InternalModifyDnRequest modifyDnRequest ) throws LdapException;
     
     
     /**
@@ -496,7 +497,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @throws Exception if there are failures while moving the entry/branch
      */
-    void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception;
+    void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException;
     
     
     /**
@@ -511,7 +512,7 @@ public interface CoreSession
      * @exception if there are failures while moving and renaming the entry
      * or branch
      */
-    void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn ) throws Exception;
+    void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn ) throws LdapException;
     
     
     /**
@@ -527,7 +528,7 @@ public interface CoreSession
      * @exception if there are failures while moving and renaming the entry
      * or branch
      */
-    void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception;
+    void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException;
     
     
     /**
@@ -543,7 +544,7 @@ public interface CoreSession
      * @exception if there are failures while moving and renaming the entry
      * or branch
      */
-    void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws Exception;
+    void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException;
     
     
     /**
@@ -560,7 +561,7 @@ public interface CoreSession
      * @exception if there are failures while moving and renaming the entry
      * or branch
      */
-    void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws Exception;
+    void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException;
     
     
     /**
@@ -570,7 +571,7 @@ public interface CoreSession
      * @throws Exception if there are failures while moving and renaming the entry
      * or branch
      */
-    void moveAndRename( InternalModifyDnRequest modifyDnRequest ) throws Exception;
+    void moveAndRename( InternalModifyDnRequest modifyDnRequest ) throws LdapException;
     
     
     /**
@@ -581,7 +582,7 @@ public interface CoreSession
      * @throws Exception if there are failures while moving and renaming the entry
      * or branch
      */
-    void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception;
+    void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException;
     
     
     /**
@@ -596,7 +597,7 @@ public interface CoreSession
      * distinguished name is to be deleted from the entry
      * @throws Exception if there are failures while renaming the entry
      */
-    void rename( DN dn, RDN newRdn, boolean deleteOldRdn ) throws Exception;
+    void rename( DN dn, RDN newRdn, boolean deleteOldRdn ) throws LdapException;
     
     
     /**
@@ -612,7 +613,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @throws Exception if there are failures while renaming the entry
      */
-    void rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception;
+    void rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException;
     
     
     /**
@@ -628,7 +629,7 @@ public interface CoreSession
      * @param ignoreReferral a flag to tell the server to ignore referrals
      * @throws Exception if there are failures while renaming the entry
      */
-    void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws Exception;
+    void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException;
     
     
     /**
@@ -645,7 +646,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @throws Exception if there are failures while renaming the entry
      */
-    void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws Exception;
+    void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException;
     
     
     /**
@@ -654,7 +655,7 @@ public interface CoreSession
      * @param modifyDnRequest The requested modification
      * @throws Exception if there are failures while renaming the entry
      */
-    void rename( InternalModifyDnRequest modifyDnRequest ) throws Exception;
+    void rename( InternalModifyDnRequest modifyDnRequest ) throws LdapException;
     
     
     /**
@@ -664,7 +665,7 @@ public interface CoreSession
      * @param log a flag set if the added entry should be stored in the changeLog
      * @throws Exception if there are failures while renaming the entry
      */
-    void rename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception;
+    void rename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException;
     
     
     /**
@@ -679,7 +680,7 @@ public interface CoreSession
      * @throws Exception if there are failures while listing children
      */
     EntryFilteringCursor list( DN dn, AliasDerefMode aliasDerefMode, 
-        Set<AttributeTypeOptions> returningAttributes ) throws Exception;
+        Set<AttributeTypeOptions> returningAttributes ) throws LdapException;
     
     
     /**
@@ -698,7 +699,7 @@ public interface CoreSession
      * @throws Exception if there are failures while listing children
      */
     EntryFilteringCursor list( DN dn, AliasDerefMode aliasDerefMode, 
-        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws Exception;
+        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException;
     
     
     /**
@@ -710,7 +711,7 @@ public interface CoreSession
      * @param filter the search filter
      * @throws Exception if there are failures while listing children
      */
-    EntryFilteringCursor search( DN dn, String filter ) throws Exception;
+    EntryFilteringCursor search( DN dn, String filter ) throws LdapException;
     
     
     /**
@@ -723,7 +724,7 @@ public interface CoreSession
      * @param ignoreReferrals a flag to tell the server to ignore referrals
      * @throws Exception if there are failures while listing children
      */
-    EntryFilteringCursor search( DN dn, String filter, boolean ignoreReferrals ) throws Exception;
+    EntryFilteringCursor search( DN dn, String filter, boolean ignoreReferrals ) throws LdapException;
     
     
     /**
@@ -737,19 +738,7 @@ public interface CoreSession
      * @throws Exception if there are failures while listing children
      */
     EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode, 
-        Set<AttributeTypeOptions> returningAttributes ) throws Exception;
-    
-    
-    /**
-     * Searches the directory using a specified search scope and filter.
-     *
-     * @param dn the distinguished name of the entry to list the children of
-     * @param scope the search scope to apply
-     * @param filter the search filter
-     * @param aliasDerefMode the alias dereferencing mode used
-     * @param returningAttributes the attributes to return
-     * @throws Exception if there are failures while listing children
-     */
+        Set<AttributeTypeOptions> returningAttributes ) throws LdapException;
     
     
     /**
@@ -764,14 +753,14 @@ public interface CoreSession
      * @throws Exception if there are failures while listing children
      */
     EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode, 
-        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws Exception;
+        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException;
 
 
-    EntryFilteringCursor search( InternalSearchRequest searchRequest ) throws Exception;
+    EntryFilteringCursor search( InternalSearchRequest searchRequest ) throws LdapException;
 
 
-    void unbind() throws Exception;
+    void unbind() throws LdapException;
     
     
-    void unbind( InternalUnbindRequest unbindRequest ) throws Exception;
+    void unbind( InternalUnbindRequest unbindRequest ) throws LdapException;
 }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/entry/ServerEntryFactory.java Thu Jun  3 18:23:18 2010
@@ -20,9 +20,8 @@
 package org.apache.directory.server.core.entry;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.name.DN;
 
 
@@ -45,5 +44,5 @@ public interface ServerEntryFactory
      * Creates a new ServerEntry which has not yet been added to the 
      * directory.
      */
-    Entry newEntry( DN dn ) throws NamingException;
+    Entry newEntry( DN dn ) throws LdapException;
 }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/InterceptorException.java Thu Jun  3 18:23:18 2010
@@ -20,13 +20,11 @@
 package org.apache.directory.server.core.interceptor;
 
 
-import javax.naming.NamingException;
-
 import org.apache.directory.shared.ldap.exception.LdapException;
 
 
 /**
- * A {@link NamingException} that wraps uncaught runtime exceptions thrown
+ * A {@link LdapException} that wraps uncaught runtime exceptions thrown
  * from {@link Interceptor}s.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/AddOperationContext.java Thu Jun  3 18:23:18 2010
@@ -26,6 +26,7 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.controls.ManageDsaITControl;
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.message.internal.InternalAddRequest;
 import org.apache.directory.shared.ldap.name.DN;
 
@@ -89,7 +90,7 @@ public class AddOperationContext extends
     }
 
 
-    public AddOperationContext( CoreSession session, InternalAddRequest addRequest ) throws Exception
+    public AddOperationContext( CoreSession session, InternalAddRequest addRequest ) throws LdapException
     {
         super( session );
         entry = new ClonedServerEntry( 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/ModifyOperationContext.java Thu Jun  3 18:23:18 2010
@@ -78,7 +78,7 @@ public class ModifyOperationContext exte
     }
 
 
-    public ModifyOperationContext( CoreSession session, InternalModifyRequest modifyRequest ) throws Exception
+    public ModifyOperationContext( CoreSession session, InternalModifyRequest modifyRequest ) throws LdapException
     {
         super( session, modifyRequest.getName() );
 

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchOperationContext.java Thu Jun  3 18:23:18 2010
@@ -62,7 +62,7 @@ public class SearchOperationContext exte
      * Creates a new instance of SearchOperationContext.
      * @throws Exception 
      */
-    public SearchOperationContext( CoreSession session, InternalSearchRequest searchRequest ) throws Exception
+    public SearchOperationContext( CoreSession session, InternalSearchRequest searchRequest ) throws LdapException
     {
         super( session );
         

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/interceptor/context/SearchingOperationContext.java Thu Jun  3 18:23:18 2010
@@ -26,7 +26,6 @@ import java.util.Collection;
 import java.util.HashSet;
 import java.util.Set;
 
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 
 import org.apache.commons.lang.ArrayUtils;
@@ -113,7 +112,7 @@ public abstract class SearchingOperation
      *
      * @param dn The DN to get the suffix from
      * @param aliasDerefMode the alias dereferencing mode to use
-     * @throws NamingException 
+     * @throws LdapException 
      */
     public SearchingOperationContext( CoreSession session, DN dn, Set<AttributeTypeOptions> returningAttributes )
     {
@@ -123,7 +122,7 @@ public abstract class SearchingOperation
 
 
     protected void setReturningAttributes( Collection<String> attributesIds ) 
-        throws Exception
+        throws LdapException
     {
         setReturningAttributes( attributesIds.toArray( StringTools.EMPTY_STRINGS ) );
     }

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartition.java Thu Jun  3 18:23:18 2010
@@ -23,8 +23,6 @@ package org.apache.directory.server.core
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.naming.NamingException;
-
 import org.apache.directory.server.constants.ApacheSchemaConstants;
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
@@ -457,7 +455,7 @@ public final class SchemaPartition exten
      * The current time is used to set the timestamp and the DN of current user
      * is set for the modifiersName.
      * 
-     * @throws NamingException if the update fails
+     * @throws LdapException if the update fails
      */
     private void updateSchemaModificationAttributes( OperationContext opContext ) throws LdapException
     {

Modified: directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java (original)
+++ directory/apacheds/trunk/core-api/src/main/java/org/apache/directory/server/core/schema/SchemaPartitionDao.java Thu Jun  3 18:23:18 2010
@@ -6,6 +6,7 @@ import java.util.Set;
 
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
 import org.apache.directory.shared.ldap.entry.Entry;
+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.MatchingRule;
@@ -51,7 +52,7 @@ public interface SchemaPartitionDao
      * @param entityName one of the names of the entity or it's numeric id
      * @return the name of the schema that contains that entity or null if no entity with 
      * that alias name exists
-     * @throws NamingException if more than one entity has the name, or if there 
+     * @throws LdapException if more than one entity has the name, or if there 
      * are underlying data access problems
      */
     String findSchema( String entityName ) throws Exception;
@@ -71,7 +72,7 @@ public interface SchemaPartitionDao
      * @param entityName one of the names of the entity or it's numeric id
      * @return the search result for the entity or null if no such entity exists with 
      * that alias or numeric oid
-     * @throws NamingException if more than one entity has the name, or if there 
+     * @throws LdapException if more than one entity has the name, or if there 
      * are underlying data access problems
      */
     Entry find( String entityName ) throws Exception;
@@ -105,7 +106,7 @@ public interface SchemaPartitionDao
      * reaction will occur in a replica.
      * 
      * @param schemaName the name of the schema to enable
-     * @throws NamingException if there is a problem updating the schema entry
+     * @throws LdapException if there is a problem updating the schema entry
      */
     void enableSchema( String schemaName ) throws Exception;
 
@@ -116,7 +117,7 @@ public interface SchemaPartitionDao
      *
      * @param numericOid the numeric identifier for the entity
      * @return the set of matchingRules and attributeTypes depending on a syntax
-     * @throws NamingException if the dao fails to perform search operations
+     * @throws LdapException if the dao fails to perform search operations
      */
     Set<Entry> listSyntaxDependents( String numericOid ) throws Exception;
 
@@ -135,7 +136,7 @@ public interface SchemaPartitionDao
      * 
      * @param schemaName the name of the schema to search for dependees
      * @return a set of SearchResults over the schemas whose m-dependency attribute contains schemaName
-     * @throws NamingException if there is a problem while searching the schema partition
+     * @throws LdapException if there is a problem while searching the schema partition
      */
     Set<Entry> listSchemaDependents( String schemaName ) throws Exception;
 
@@ -145,7 +146,7 @@ public interface SchemaPartitionDao
      * 
      * @param schemaName the name of the schema to search for dependencies
      * @return a set of SearchResults over the schemas whose m-dependency attribute contains schemaName
-     * @throws NamingException if there is a problem while searching the schema partition
+     * @throws LdapException if there is a problem while searching the schema partition
      */
     Set<Entry> listEnabledSchemaDependents( String schemaName ) throws Exception;
 

Modified: directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java (original)
+++ directory/apacheds/trunk/core-jndi/src/main/java/org/apache/directory/server/core/jndi/ServerContext.java Thu Jun  3 18:23:18 2010
@@ -76,9 +76,9 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.cursor.EmptyCursor;
 import org.apache.directory.shared.ldap.cursor.SingletonCursor;
 import org.apache.directory.shared.ldap.entry.DefaultEntry;
+import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.entry.EntryAttribute;
 import org.apache.directory.shared.ldap.entry.Modification;
-import org.apache.directory.shared.ldap.entry.Entry;
 import org.apache.directory.shared.ldap.exception.LdapException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeTypeException;
 import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
@@ -713,7 +713,16 @@ public abstract class ServerContext impl
     public Context createSubcontext( Name name ) throws NamingException
     {
         DN target = buildTarget( DN.fromName( name ) );
-        Entry serverEntry = service.newEntry( target );
+        Entry serverEntry = null;
+        
+        try
+        {
+            serverEntry = service.newEntry( target );
+        }
+        catch ( LdapException le )
+        {
+            throw new NamingException( le.getMessage() );
+        }
         
         try
         {
@@ -897,7 +906,16 @@ public abstract class ServerContext impl
         else if ( obj instanceof Serializable )
         {
             // Serialize and add outAttrs
-            Entry serverEntry = service.newEntry( target );
+            Entry serverEntry = null;
+            
+            try
+            {
+                serverEntry = service.newEntry( target );
+            }
+            catch ( LdapException le )
+            {
+                throw new NamingException( I18n.err( I18n.ERR_495, obj ) );
+            }
 
             if ( ( outServerEntry != null ) && ( outServerEntry.size() > 0 ) )
             {

Modified: directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java (original)
+++ directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockCoreSession.java Thu Jun  3 18:23:18 2010
@@ -21,6 +21,7 @@ package org.apache.directory.server.core
 
 
 import java.net.SocketAddress;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
@@ -46,11 +47,12 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.BinaryValue;
 import org.apache.directory.shared.ldap.entry.DefaultModification;
-import org.apache.directory.shared.ldap.entry.StringValue;
-import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.entry.StringValue;
 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.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -115,7 +117,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void add( Entry entry ) throws Exception
+    public void add( Entry entry ) throws LdapException
     {
         add( entry, LogChange.TRUE );
     }
@@ -124,7 +126,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void add( Entry entry, boolean ignoreReferral ) throws Exception
+    public void add( Entry entry, boolean ignoreReferral ) throws LdapException
     {
         add( entry, ignoreReferral, LogChange.TRUE );
     }
@@ -133,7 +135,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void add( Entry entry, LogChange log ) throws Exception
+    public void add( Entry entry, LogChange log ) throws LdapException
     {
         AddOperationContext opContext = new AddOperationContext( this, entry );
 
@@ -147,7 +149,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void add( Entry entry, boolean ignoreReferral, LogChange log ) throws Exception
+    public void add( Entry entry, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         AddOperationContext opContext = new AddOperationContext( this, entry );
 
@@ -162,7 +164,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void add( InternalAddRequest addRequest ) throws Exception
+    public void add( InternalAddRequest addRequest ) throws LdapException
     {
         add( addRequest, LogChange.TRUE );
     }
@@ -171,7 +173,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void add( InternalAddRequest addRequest, LogChange log ) throws Exception
+    public void add( InternalAddRequest addRequest, LogChange log ) throws LdapException
     {
         AddOperationContext opContext = new AddOperationContext( this, addRequest );
 
@@ -227,7 +229,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public boolean compare( DN dn, String oid, Object value ) throws Exception
+    public boolean compare( DN dn, String oid, Object value ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         
@@ -240,7 +242,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public boolean compare( DN dn, String oid, Object value, boolean ignoreReferral ) throws Exception
+    public boolean compare( DN dn, String oid, Object value, boolean ignoreReferral ) throws LdapException
     {
         CompareOperationContext opContext =  
                 new CompareOperationContext( this, dn, oid, 
@@ -256,7 +258,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn ) throws Exception
+    public void delete( DN dn ) throws LdapException
     {
         delete( dn, LogChange.TRUE );
     }
@@ -265,7 +267,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, LogChange log ) throws Exception
+    public void delete( DN dn, LogChange log ) throws LdapException
     {
         DeleteOperationContext opContext = new DeleteOperationContext( this, dn );
 
@@ -279,7 +281,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, boolean ignoreReferral  ) throws Exception
+    public void delete( DN dn, boolean ignoreReferral  ) throws LdapException
     {
         delete( dn, ignoreReferral, LogChange.TRUE );
     }
@@ -288,7 +290,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, boolean ignoreReferral, LogChange log ) throws Exception
+    public void delete( DN dn, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         DeleteOperationContext opContext = new DeleteOperationContext( this, dn );
         
@@ -440,7 +442,7 @@ public class MockCoreSession implements 
      * @see org.apache.directory.server.core.CoreSession#list(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
      */
     public EntryFilteringCursor list( DN dn, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes ) throws Exception
+        Set<AttributeTypeOptions> returningAttributes ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         
@@ -455,7 +457,7 @@ public class MockCoreSession implements 
      * @see org.apache.directory.server.core.CoreSession#list(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set, int, int)
      */
     public EntryFilteringCursor list( DN dn, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws Exception
+        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
 
@@ -471,7 +473,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public Entry lookup( DN dn ) throws Exception
+    public Entry lookup( DN dn ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         return operationManager.lookup( new LookupOperationContext( this, dn ) );
@@ -481,7 +483,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( DN dn, String[] attrId ) throws Exception
+    public Entry lookup( DN dn, String[] attrId ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         return operationManager.lookup( 
@@ -492,7 +494,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods ) throws Exception
+    public void modify( DN dn, List<Modification> mods ) throws LdapException
     {
         modify( dn, mods, LogChange.TRUE );
     }
@@ -501,7 +503,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, LogChange log ) throws Exception
+    public void modify( DN dn, List<Modification> mods, LogChange log ) throws LdapException
     {
         if ( mods == null )
         {
@@ -527,7 +529,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral ) throws Exception
+    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral ) throws LdapException
     {
         modify( dn, mods, ignoreReferral, LogChange.TRUE );
     }
@@ -536,7 +538,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws Exception
+    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         if ( mods == null )
         {
@@ -563,7 +565,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent ) throws Exception
+    public void move( DN dn, DN newParent ) throws LdapException
     {
         move( dn, newParent, LogChange.TRUE );
     }
@@ -572,7 +574,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent, LogChange log ) throws Exception
+    public void move( DN dn, DN newParent, LogChange log ) throws LdapException
     {
         MoveOperationContext opContext = new MoveOperationContext( this, dn, newParent );
         
@@ -595,7 +597,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws Exception
+    public void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         MoveOperationContext opContext = new MoveOperationContext( this, dn, newParent );
@@ -610,7 +612,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn ) throws Exception
+    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn ) throws LdapException
     {
         moveAndRename( dn, newParent, newRdn, deleteOldRdn, LogChange.TRUE );
     }
@@ -619,7 +621,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception
+    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
     {
         MoveAndRenameOperationContext opContext = 
             new MoveAndRenameOperationContext( this, dn, newParent, newRdn, deleteOldRdn );
@@ -634,7 +636,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws Exception
+    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException
     {
         moveAndRename( dn, newParent, newRdn, deleteOldRdn, ignoreReferral, LogChange.TRUE );
     }
@@ -643,7 +645,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws Exception
+    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         MoveAndRenameOperationContext opContext = new MoveAndRenameOperationContext( this, dn, newParent, newRdn, deleteOldRdn );
@@ -658,7 +660,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn ) throws Exception
+    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn ) throws LdapException
     {
         rename( dn, newRdn, deleteOldRdn, LogChange.TRUE );
     }
@@ -667,7 +669,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception
+    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
     {
         RenameOperationContext opContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );
         
@@ -681,7 +683,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws Exception
+    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException
     {
         rename( dn, newRdn, deleteOldRdn, ignoreReferral, LogChange.TRUE );
     }
@@ -690,7 +692,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws Exception
+    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         RenameOperationContext opContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );
@@ -705,7 +707,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( DN dn, String filter ) throws Exception
+    public EntryFilteringCursor search( DN dn, String filter ) throws LdapException
     {
         return search( dn, filter, true );
     }
@@ -714,10 +716,19 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( DN dn, String filter, boolean ignoreReferrals ) throws Exception
+    public EntryFilteringCursor search( DN dn, String filter, boolean ignoreReferrals ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
-        ExprNode filterNode = FilterParser.parse( filter ); 
+        ExprNode filterNode = null;
+        
+        try
+        {
+            FilterParser.parse( filter ); 
+        }
+        catch ( ParseException pe )
+        {
+            throw new LdapInvalidSearchFilterException( pe.getMessage() );
+        }
         
         SearchOperationContext searchOperationContext = new SearchOperationContext( this, dn, SearchScope.OBJECT, 
             filterNode, null );
@@ -732,7 +743,7 @@ public class MockCoreSession implements 
      * @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
      */
     public EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes ) throws Exception
+        Set<AttributeTypeOptions> returningAttributes ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         
@@ -748,7 +759,7 @@ public class MockCoreSession implements 
      * @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set, int, int)
      */
     public EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws Exception
+        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         
@@ -770,7 +781,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public boolean compare( InternalCompareRequest compareRequest ) throws Exception
+    public boolean compare( InternalCompareRequest compareRequest ) throws LdapException
     {
         CompareOperationContext opContext = new CompareOperationContext( this, compareRequest );
         OperationManager operationManager = directoryService.getOperationManager();
@@ -783,7 +794,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void delete( InternalDeleteRequest deleteRequest ) throws Exception
+    public void delete( InternalDeleteRequest deleteRequest ) throws LdapException
     {
         delete( deleteRequest, LogChange.TRUE );
     }
@@ -792,7 +803,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void delete( InternalDeleteRequest deleteRequest, LogChange log ) throws Exception
+    public void delete( InternalDeleteRequest deleteRequest, LogChange log ) throws LdapException
     {
         DeleteOperationContext opContext = new DeleteOperationContext( this, deleteRequest );
         
@@ -804,7 +815,7 @@ public class MockCoreSession implements 
     }
 
 
-    public boolean exists( DN dn ) throws Exception
+    public boolean exists( DN dn ) throws LdapException
     {
         EntryOperationContext opContext = new EntryOperationContext( this, dn );
         OperationManager operationManager = directoryService.getOperationManager();
@@ -815,7 +826,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void modify( InternalModifyRequest modifyRequest ) throws Exception
+    public void modify( InternalModifyRequest modifyRequest ) throws LdapException
     {
         modify( modifyRequest, LogChange.TRUE );
     }
@@ -824,7 +835,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void modify( InternalModifyRequest modifyRequest, LogChange log ) throws Exception
+    public void modify( InternalModifyRequest modifyRequest, LogChange log ) throws LdapException
     {
         ModifyOperationContext opContext = new ModifyOperationContext( this, modifyRequest );
 
@@ -839,7 +850,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void move( InternalModifyDnRequest modifyDnRequest ) throws Exception
+    public void move( InternalModifyDnRequest modifyDnRequest ) throws LdapException
     {
         move( modifyDnRequest, LogChange.TRUE );
     }
@@ -848,7 +859,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
+    public void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
     {
         MoveOperationContext opContext = new MoveOperationContext( this, modifyDnRequest );
         
@@ -863,7 +874,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( InternalModifyDnRequest modifyDnRequest ) throws Exception
+    public void moveAndRename( InternalModifyDnRequest modifyDnRequest ) throws LdapException
     {
         moveAndRename( modifyDnRequest, LogChange.TRUE );
     }
@@ -872,7 +883,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
+    public void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
     {
         MoveAndRenameOperationContext opContext = new MoveAndRenameOperationContext( this, modifyDnRequest );
 
@@ -887,7 +898,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void rename( InternalModifyDnRequest modifyDnRequest ) throws Exception
+    public void rename( InternalModifyDnRequest modifyDnRequest ) throws LdapException
     {
         rename( modifyDnRequest, LogChange.TRUE );
     }
@@ -896,7 +907,7 @@ public class MockCoreSession implements 
     /**
      * {@inheritDoc}
      */
-    public void rename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
+    public void rename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
     {
         RenameOperationContext opContext = new RenameOperationContext( this, modifyDnRequest );
 
@@ -908,7 +919,7 @@ public class MockCoreSession implements 
     }
 
 
-    public EntryFilteringCursor search( InternalSearchRequest searchRequest ) throws Exception
+    public EntryFilteringCursor search( InternalSearchRequest searchRequest ) throws LdapException
     {
         SearchOperationContext opContext = new SearchOperationContext( this, searchRequest );
         OperationManager operationManager = directoryService.getOperationManager();
@@ -919,7 +930,7 @@ public class MockCoreSession implements 
     }
 
 
-    public void unbind() throws Exception
+    public void unbind() throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         operationManager.unbind( new UnbindOperationContext( this ) );

Modified: directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java?rev=951097&r1=951096&r2=951097&view=diff
==============================================================================
--- directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java (original)
+++ directory/apacheds/trunk/core-mock/src/main/java/org/apache/directory/server/core/MockDirectoryService.java Thu Jun  3 18:23:18 2010
@@ -340,7 +340,7 @@ public class MockDirectoryService implem
     }
 
 
-    public Entry newEntry( DN dn ) throws NamingException
+    public Entry newEntry( DN dn ) throws LdapException
     {
         return null;
     }

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=951097&r1=951096&r2=951097&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 Thu Jun  3 18:23:18 2010
@@ -21,6 +21,7 @@ package org.apache.directory.server.core
 
 
 import java.net.SocketAddress;
+import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
@@ -46,11 +47,12 @@ import org.apache.directory.server.i18n.
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.entry.BinaryValue;
 import org.apache.directory.shared.ldap.entry.DefaultModification;
-import org.apache.directory.shared.ldap.entry.StringValue;
-import org.apache.directory.shared.ldap.entry.Modification;
 import org.apache.directory.shared.ldap.entry.Entry;
+import org.apache.directory.shared.ldap.entry.Modification;
+import org.apache.directory.shared.ldap.entry.StringValue;
 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.FilterParser;
 import org.apache.directory.shared.ldap.filter.SearchScope;
@@ -115,7 +117,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void add( Entry entry ) throws Exception
+    public void add( Entry entry ) throws LdapException
     {
         add( entry, LogChange.TRUE );
     }
@@ -124,7 +126,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void add( Entry entry, boolean ignoreReferral ) throws Exception
+    public void add( Entry entry, boolean ignoreReferral ) throws LdapException
     {
         add( entry, ignoreReferral, LogChange.TRUE );
     }
@@ -133,7 +135,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void add( Entry entry, LogChange log ) throws Exception
+    public void add( Entry entry, LogChange log ) throws LdapException
     {
         AddOperationContext opContext = new AddOperationContext( this, entry );
 
@@ -147,7 +149,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void add( Entry entry, boolean ignoreReferral, LogChange log ) throws Exception
+    public void add( Entry entry, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         AddOperationContext opContext = new AddOperationContext( this, entry );
 
@@ -162,7 +164,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void add( InternalAddRequest addRequest ) throws Exception
+    public void add( InternalAddRequest addRequest ) throws LdapException
     {
         add( addRequest, LogChange.TRUE );
     }
@@ -171,7 +173,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void add( InternalAddRequest addRequest, LogChange log ) throws Exception
+    public void add( InternalAddRequest addRequest, LogChange log ) throws LdapException
     {
         AddOperationContext opContext = new AddOperationContext( this, addRequest );
 
@@ -227,7 +229,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public boolean compare( DN dn, String oid, Object value ) throws Exception
+    public boolean compare( DN dn, String oid, Object value ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         
@@ -240,7 +242,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public boolean compare( DN dn, String oid, Object value, boolean ignoreReferral ) throws Exception
+    public boolean compare( DN dn, String oid, Object value, boolean ignoreReferral ) throws LdapException
     {
         CompareOperationContext opContext =  
                 new CompareOperationContext( this, dn, oid, 
@@ -256,7 +258,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn ) throws Exception
+    public void delete( DN dn ) throws LdapException
     {
         delete( dn, LogChange.TRUE );
     }
@@ -265,7 +267,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, LogChange log ) throws Exception
+    public void delete( DN dn, LogChange log ) throws LdapException
     {
         DeleteOperationContext opContext = new DeleteOperationContext( this, dn );
 
@@ -279,7 +281,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, boolean ignoreReferral  ) throws Exception
+    public void delete( DN dn, boolean ignoreReferral  ) throws LdapException
     {
         delete( dn, ignoreReferral, LogChange.TRUE );
     }
@@ -288,7 +290,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( DN dn, boolean ignoreReferral, LogChange log ) throws Exception
+    public void delete( DN dn, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         DeleteOperationContext opContext = new DeleteOperationContext( this, dn );
         
@@ -440,7 +442,7 @@ public class DefaultCoreSession implemen
      * @see org.apache.directory.server.core.CoreSession#list(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
      */
     public EntryFilteringCursor list( DN dn, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes ) throws Exception
+        Set<AttributeTypeOptions> returningAttributes ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
 
@@ -455,7 +457,7 @@ public class DefaultCoreSession implemen
      * @see org.apache.directory.server.core.CoreSession#list(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set, int, int)
      */
     public EntryFilteringCursor list( DN dn, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws Exception
+        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
 
@@ -471,7 +473,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public Entry lookup( DN dn ) throws Exception
+    public Entry lookup( DN dn ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         return operationManager.lookup( new LookupOperationContext( this, dn ) );
@@ -481,7 +483,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public Entry lookup( DN dn, String[] attrId ) throws Exception
+    public Entry lookup( DN dn, String[] attrId ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         LookupOperationContext lookupOperationContext = new LookupOperationContext( this, dn, attrId );
@@ -495,7 +497,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods ) throws Exception
+    public void modify( DN dn, List<Modification> mods ) throws LdapException
     {
         modify( dn, mods, LogChange.TRUE );
     }
@@ -504,7 +506,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, LogChange log ) throws Exception
+    public void modify( DN dn, List<Modification> mods, LogChange log ) throws LdapException
     {
         if ( mods == null )
         {
@@ -530,7 +532,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral ) throws Exception
+    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral ) throws LdapException
     {
         modify( dn, mods, ignoreReferral, LogChange.TRUE );
     }
@@ -539,7 +541,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws Exception
+    public void modify( DN dn, List<Modification> mods, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         if ( mods == null )
         {
@@ -566,7 +568,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent ) throws Exception
+    public void move( DN dn, DN newParent ) throws LdapException
     {
         move( dn, newParent, LogChange.TRUE );
     }
@@ -575,7 +577,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent, LogChange log ) throws Exception
+    public void move( DN dn, DN newParent, LogChange log ) throws LdapException
     {
         MoveOperationContext opContext = new MoveOperationContext( this, dn, newParent );
         
@@ -598,7 +600,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws Exception
+    public void move( DN dn, DN newParent, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         MoveOperationContext opContext = new MoveOperationContext( this, dn, newParent );
@@ -613,7 +615,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn ) throws Exception
+    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn ) throws LdapException
     {
         moveAndRename( dn, newParent, newRdn, deleteOldRdn, LogChange.TRUE );
     }
@@ -622,7 +624,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception
+    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
     {
         MoveAndRenameOperationContext opContext = 
             new MoveAndRenameOperationContext( this, dn, newParent, newRdn, deleteOldRdn );
@@ -637,7 +639,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws Exception
+    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException
     {
         moveAndRename( dn, newParent, newRdn, deleteOldRdn, ignoreReferral, LogChange.TRUE );
     }
@@ -646,7 +648,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws Exception
+    public void moveAndRename( DN dn, DN newParent, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         MoveAndRenameOperationContext opContext = new MoveAndRenameOperationContext( this, dn, newParent, newRdn, deleteOldRdn );
@@ -661,7 +663,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn ) throws Exception
+    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn ) throws LdapException
     {
         rename( dn, newRdn, deleteOldRdn, LogChange.TRUE );
     }
@@ -670,7 +672,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws Exception
+    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, LogChange log ) throws LdapException
     {
         RenameOperationContext opContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );
         
@@ -685,7 +687,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws Exception
+    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral ) throws LdapException
     {
         rename( dn, newRdn, deleteOldRdn, ignoreReferral, LogChange.TRUE );
     }
@@ -694,7 +696,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws Exception
+    public void rename( DN dn, RDN newRdn, boolean deleteOldRdn, boolean ignoreReferral, LogChange log ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         RenameOperationContext opContext = new RenameOperationContext( this, dn, newRdn, deleteOldRdn );
@@ -709,7 +711,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( DN dn, String filter ) throws Exception
+    public EntryFilteringCursor search( DN dn, String filter ) throws LdapException
     {
         return search( dn, filter, true );
     }
@@ -718,10 +720,19 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public EntryFilteringCursor search( DN dn, String filter, boolean ignoreReferrals ) throws Exception
+    public EntryFilteringCursor search( DN dn, String filter, boolean ignoreReferrals ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
-        ExprNode filterNode = FilterParser.parse( filter ); 
+        ExprNode filterNode = null;
+        
+        try
+        { 
+            filterNode = (ExprNode)FilterParser.parse( filter ); 
+        }
+        catch ( ParseException pe )
+        {
+            throw new LdapInvalidSearchFilterException( pe.getMessage() );
+        }
         
         SearchOperationContext searchOperationContext = new SearchOperationContext( this, dn, SearchScope.OBJECT, 
             filterNode, null );
@@ -736,7 +747,7 @@ public class DefaultCoreSession implemen
      * @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set)
      */
     public EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes ) throws Exception
+        Set<AttributeTypeOptions> returningAttributes ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
 
@@ -752,7 +763,7 @@ public class DefaultCoreSession implemen
      * @see org.apache.directory.server.core.CoreSession#search(org.apache.directory.shared.ldap.name.DN, org.apache.directory.shared.ldap.filter.SearchScope, org.apache.directory.shared.ldap.filter.ExprNode, org.apache.directory.shared.ldap.message.AliasDerefMode, java.util.Set, int, int)
      */
     public EntryFilteringCursor search( DN dn, SearchScope scope, ExprNode filter, AliasDerefMode aliasDerefMode,
-        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws Exception
+        Set<AttributeTypeOptions> returningAttributes, long sizeLimit, int timeLimit ) throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
 
@@ -775,7 +786,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public boolean compare( InternalCompareRequest compareRequest ) throws Exception
+    public boolean compare( InternalCompareRequest compareRequest ) throws LdapException
     {
         CompareOperationContext opContext = new CompareOperationContext( this, compareRequest );
         OperationManager operationManager = directoryService.getOperationManager();
@@ -788,7 +799,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( InternalDeleteRequest deleteRequest ) throws Exception
+    public void delete( InternalDeleteRequest deleteRequest ) throws LdapException
     {
         delete( deleteRequest, LogChange.TRUE );
     }
@@ -797,7 +808,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void delete( InternalDeleteRequest deleteRequest, LogChange log ) throws Exception
+    public void delete( InternalDeleteRequest deleteRequest, LogChange log ) throws LdapException
     {
         DeleteOperationContext opContext = new DeleteOperationContext( this, deleteRequest );
         
@@ -809,7 +820,7 @@ public class DefaultCoreSession implemen
     }
 
 
-    public boolean exists( DN dn ) throws Exception
+    public boolean exists( DN dn ) throws LdapException
     {
         EntryOperationContext opContext = new EntryOperationContext( this, dn );
         OperationManager operationManager = directoryService.getOperationManager();
@@ -820,7 +831,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( InternalModifyRequest modifyRequest ) throws Exception
+    public void modify( InternalModifyRequest modifyRequest ) throws LdapException
     {
         modify( modifyRequest, LogChange.TRUE );
     }
@@ -829,7 +840,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void modify( InternalModifyRequest modifyRequest, LogChange log ) throws Exception
+    public void modify( InternalModifyRequest modifyRequest, LogChange log ) throws LdapException
     {
         ModifyOperationContext opContext = new ModifyOperationContext( this, modifyRequest );
 
@@ -844,7 +855,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( InternalModifyDnRequest modifyDnRequest ) throws Exception
+    public void move( InternalModifyDnRequest modifyDnRequest ) throws LdapException
     {
         move( modifyDnRequest, LogChange.TRUE );
     }
@@ -853,7 +864,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
+    public void move( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
     {
         MoveOperationContext opContext = new MoveOperationContext( this, modifyDnRequest );
         
@@ -868,7 +879,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( InternalModifyDnRequest modifyDnRequest ) throws Exception
+    public void moveAndRename( InternalModifyDnRequest modifyDnRequest ) throws LdapException
     {
         moveAndRename( modifyDnRequest, LogChange.TRUE );
     }
@@ -877,7 +888,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc} 
      */
-    public void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
+    public void moveAndRename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
     {
         MoveAndRenameOperationContext opContext = new MoveAndRenameOperationContext( this, modifyDnRequest );
 
@@ -892,7 +903,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( InternalModifyDnRequest modifyDnRequest ) throws Exception
+    public void rename( InternalModifyDnRequest modifyDnRequest ) throws LdapException
     {
         rename( modifyDnRequest, LogChange.TRUE );
     }
@@ -901,7 +912,7 @@ public class DefaultCoreSession implemen
     /**
      * {@inheritDoc}
      */
-    public void rename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws Exception
+    public void rename( InternalModifyDnRequest modifyDnRequest, LogChange log ) throws LdapException
     {
         RenameOperationContext opContext = new RenameOperationContext( this, modifyDnRequest );
 
@@ -913,7 +924,7 @@ public class DefaultCoreSession implemen
     }
 
 
-    public EntryFilteringCursor search( InternalSearchRequest searchRequest ) throws Exception
+    public EntryFilteringCursor search( InternalSearchRequest searchRequest ) throws LdapException
     {
         SearchOperationContext opContext = new SearchOperationContext( this, searchRequest );
         OperationManager operationManager = directoryService.getOperationManager();
@@ -924,7 +935,7 @@ public class DefaultCoreSession implemen
     }
 
 
-    public void unbind() throws Exception
+    public void unbind() throws LdapException
     {
         OperationManager operationManager = directoryService.getOperationManager();
         operationManager.unbind( new UnbindOperationContext( this ) );

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=951097&r1=951096&r2=951097&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 Thu Jun  3 18:23:18 2010
@@ -1208,29 +1208,6 @@ public class DefaultDirectoryService imp
             serverEntry.add( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
 
             partitionNexus.add( new AddOperationContext( adminSession, serverEntry ) );
-
-            // TODO - confirm if we need this at all since the 
-            // group cache on initialization after this stage will
-            // search the directory for all the groups anyway
-            
-//            Interceptor authzInterceptor = interceptorChain.get( AciAuthorizationInterceptor.class.getName() );
-//            
-//            if ( authzInterceptor == null )
-//            {
-//                LOG.error( "The Authorization service is null : this is not allowed" );
-//                throw new NamingException( "The Authorization service is null" );
-//            }
-//            
-//            if ( !( authzInterceptor instanceof AciAuthorizationInterceptor ) )
-//            {
-//                LOG.error( "The Authorization service is not set correctly : '{}' is an incorect interceptor",
-//                    authzInterceptor.getClass().getName() );
-//                throw new NamingException( "The Authorization service is incorrectly set" );
-//                
-//            }
-//
-//            AciAuthorizationInterceptor authzSrvc = ( AciAuthorizationInterceptor ) authzInterceptor;
-//            authzSrvc.cacheNewGroup( name, serverEntry );
         }
 
         // -------------------------------------------------------------------



Mime
View raw message