diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java index 7b78d56a00..4765ff6c53 100644 --- a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java +++ b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DSAnnotationProcessor.java @@ -357,7 +357,7 @@ public static DirectoryService getDirectoryService() throws Exception return createDS( dsBuilder ); } - throw new LdapException( I18n.err( I18n.ERR_114 ) ); + throw new LdapException( I18n.err( I18n.ERR_01001_CANNOT_CREATE_DIRECTORY_SERVICE ) ); } @@ -384,7 +384,7 @@ else if ( entry.isChangeModify() ) } else { - String message = I18n.err( I18n.ERR_117, entry.getChangeType() ); + String message = I18n.err( I18n.ERR_01002_UNSUPPORTED_CHANGE_TYPE, entry.getChangeType() ); throw new LdapException( message ); } } diff --git a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java index efe6eb8f21..9c8c03d07e 100644 --- a/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java +++ b/core-annotations/src/main/java/org/apache/directory/server/core/factory/DefaultDirectoryServiceFactory.java @@ -207,7 +207,7 @@ private void initSchema() throws Exception if ( !errors.isEmpty() ) { - throw new Exception( I18n.err( I18n.ERR_317, Exceptions.printErrors( errors ) ) ); + throw new Exception( I18n.err( I18n.ERR_01000_SCHEMA_LOAD_FAILED, Exceptions.printErrors( errors ) ) ); } } diff --git a/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java b/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java index 448cbcd5f1..a8ebf7909d 100644 --- a/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java +++ b/core-integ/src/main/java/org/apache/directory/server/core/integ/IntegrationUtils.java @@ -127,7 +127,7 @@ else if ( entry.isChangeModify() ) } else { - String message = I18n.err( I18n.ERR_117, entry.getChangeType() ); + String message = I18n.err( I18n.ERR_01002_UNSUPPORTED_CHANGE_TYPE, entry.getChangeType() ); LOG.error( message ); throw new NamingException( message ); } diff --git a/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java b/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java index 4b54ab3fbb..6b1c20fdbd 100644 --- a/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java +++ b/i18n/src/main/java/org/apache/directory/server/i18n/I18n.java @@ -61,6 +61,9 @@ public enum I18n ERR_00023_NEGATIVE_REVISION("ERR_00023_NEGATIVE_REVISION"), // apacheds-core-annotation errors 1000 - 1999 + ERR_01000_SCHEMA_LOAD_FAILED("ERR_01000_SCHEMA_LOAD_FAILED"), + ERR_01001_CANNOT_CREATE_DIRECTORY_SERVICE("ERR_01001_CANNOT_CREATE_DIRECTORY_SERVICE"), + ERR_01002_UNSUPPORTED_CHANGE_TYPE("ERR_01002_UNSUPPORTED_CHANGE_TYPE"), // apacheds-core-api errors 2000 - 2999 @@ -236,10 +239,8 @@ public enum I18n // ERR_110( "ERR_110" ), // ERR_111( "ERR_111" ), ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY("ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY"), - ERR_114("ERR_114"), ERR_115("ERR_115"), ERR_116("ERR_116"), - ERR_117("ERR_117"), ERR_118("ERR_118"), ERR_119("ERR_119"), ERR_120("ERR_120"), @@ -425,7 +426,6 @@ public enum I18n ERR_309("ERR_309"), ERR_313("ERR_313"), - ERR_317("ERR_317"), // ERR_318( "ERR_318" ), ERR_319("ERR_319"), ERR_320("ERR_320"), diff --git a/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties b/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties index 1931921ab7..86cd58976f 100644 --- a/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties +++ b/i18n/src/main/resources/org/apache/directory/server/i18n/errors.properties @@ -47,9 +47,11 @@ ERR_00021_CANNOT_BUILD_ENTRY=Cannot build an entry for ''{0}'' and this DN :''{1 ERR_00022_BAD_REPLICA_ID=The replicaId must be in [0, 999] ERR_00023_NEGATIVE_REVISION=revision must be greater than or equal to 0 - - # apacheds-core-annotation errors 1000 - 1999 +ERR_01000_SCHEMA_LOAD_FAILED=Schema load failed : {0} +ERR_01001_CANNOT_CREATE_DIRECTORY_SERVICE=Unable to create a DirectoryService instance for unknow reason +ERR_01002_UNSUPPORTED_CHANGE_TYPE=Unsupported changetype found in LDIF: {0} + # apacheds-core-api errors 2000 - 2999 @@ -226,10 +228,8 @@ ERR_91=Attempt to destroy wrapped partition failed. # ERR_110= # ERR_111= ERR_113_COULD_NOT_DELETE_FILE_OR_DIRECTORY=Could not delete file or directory {0} -ERR_114=Unable to create a DirectoryService instance for unknow reason ERR_115=Failed to delete the working directory. ERR_116=Failed to delete\: -ERR_117=Unsupported changetype found in LDIF: {0} ERR_118=Error encountered while delivering notifications. ERR_119=Encountered exception during event handling. ERR_120=Failed to configure the jetty http server @@ -414,7 +414,6 @@ ERR_307=Failed while parsing subtreeSpecification for {0} ERR_308=Will not allow rename operation on entries with administrative descendants. ERR_309=Bad value for the OID {0} ERR_313=Invalid operation on Name {0} -ERR_317=Schema load failed : {0} # ERR_318= ERR_319=Cannot execute indirect lookup if it is not the next operation. ERR_320=The throwReferral method is not implemented for a Bind operation diff --git a/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java b/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java index b42c0c6e33..90ecf6a54e 100644 --- a/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java +++ b/server-jndi/src/main/java/org/apache/directory/server/configuration/ApacheDS.java @@ -516,7 +516,7 @@ private void initSchema() throws Exception if ( !errors.isEmpty() ) { - throw new Exception( I18n.err( I18n.ERR_317, Exceptions.printErrors( errors ) ) ); + throw new Exception( I18n.err( I18n.ERR_01000_SCHEMA_LOAD_FAILED, Exceptions.printErrors( errors ) ) ); } } } diff --git a/service/src/main/java/org/apache/directory/server/ApacheDsService.java b/service/src/main/java/org/apache/directory/server/ApacheDsService.java index 4e30113f9d..0b5b3f76da 100644 --- a/service/src/main/java/org/apache/directory/server/ApacheDsService.java +++ b/service/src/main/java/org/apache/directory/server/ApacheDsService.java @@ -314,7 +314,7 @@ private void initSchemaManager( InstanceLayout instanceLayout ) throws Exception if ( !errors.isEmpty() ) { - throw new Exception( I18n.err( I18n.ERR_317, Exceptions.printErrors( errors ) ) ); + throw new Exception( I18n.err( I18n.ERR_01000_SCHEMA_LOAD_FAILED, Exceptions.printErrors( errors ) ) ); } }