You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by fe...@apache.org on 2010/01/21 12:27:21 UTC

svn commit: r901657 [3/4] - in /directory/apacheds/trunk: ./ avl-partition/ avl-partition/src/main/java/org/apache/directory/server/core/partition/avl/ core-annotations/ core-annotations/src/main/java/org/apache/directory/server/core/factory/ core-api/...

Added: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/GermanLanguageTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/GermanLanguageTest.java?rev=901657&view=auto
==============================================================================
--- directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/GermanLanguageTest.java (added)
+++ directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/GermanLanguageTest.java Thu Jan 21 11:27:15 2010
@@ -0,0 +1,65 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+
+package org.apache.directory.server.i18n;
+
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Locale;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * Test when translation available for current locale -> use locale translation.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class GermanLanguageTest
+{
+
+    @BeforeClass
+    public static void setup() throws Exception
+    {
+        Locale.setDefault( Locale.GERMAN );
+    }
+
+
+    @Test
+    public void testErrorTranslationGerman()
+    {
+        assertEquals( "ERR_1 Das ist Fehler 1", I18n.err( I18n.ERR_1 ) );
+        assertEquals( "ERR_2 Das ist Fehler 2 mit 1 Parameter", I18n.err( I18n.ERR_2, 1 ) );
+        assertEquals( "ERR_3 Das ist Fehler 3 mit 2 Parameter", I18n.err( I18n.ERR_3, 3, 2 ) );
+        assertEquals( "ERR_4 Das ist Fehler 4 mit mehr als 2 Parameter", I18n.err( I18n.ERR_4, 4, "mehr", "als", 2 ) );
+    }
+
+
+    @Test
+    public void testMessageTranslationGerman()
+    {
+        assertEquals( "Das ist Nachricht 1", I18n.msg( "MSG_1" ) );
+        assertEquals( "Das ist Nachricht 2 mit 1 Parameter", I18n.msg( "MSG_2", 1 ) );
+        assertEquals( "Das ist Nachricht 3 mit 2 Parameter", I18n.msg( "MSG_3", 3, 2 ) );
+        assertEquals( "Das ist Nachricht 4 mit mehr als 2 Parameter", I18n.msg( "MSG_4", 4, "mehr", "als", 2 ) );
+    }
+}

Propchange: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/GermanLanguageTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/GermanLanguageTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/InlineMessageTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/InlineMessageTest.java?rev=901657&view=auto
==============================================================================
--- directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/InlineMessageTest.java (added)
+++ directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/InlineMessageTest.java Thu Jan 21 11:27:15 2010
@@ -0,0 +1,42 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+
+package org.apache.directory.server.i18n;
+
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+
+/**
+ * Test when no translation available, but placeholders inline given in message.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class InlineMessageTest
+{
+
+    @Test
+    public void testMessageInline()
+    {
+        assertEquals( "Inline message test", I18n.msg( "Inline {0} test", "message" ) );
+    }
+}

Propchange: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/InlineMessageTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/InlineMessageTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/MissingErrorCodeTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/MissingErrorCodeTest.java?rev=901657&view=auto
==============================================================================
--- directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/MissingErrorCodeTest.java (added)
+++ directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/MissingErrorCodeTest.java Thu Jan 21 11:27:15 2010
@@ -0,0 +1,54 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+
+package org.apache.directory.server.i18n;
+
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+
+/**
+ * Test when missing error code.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class MissingErrorCodeTest
+{
+    @Test
+    public void testErrorTranslationMissing()
+    {
+        assertEquals( "MissingErrorCode ()", I18n.err( "MissingErrorCode" ) );
+        assertEquals( "MissingErrorCode (1)", I18n.err( "MissingErrorCode", 1 ) );
+        assertEquals( "MissingErrorCode (3,2)", I18n.err( "MissingErrorCode", 3, 2 ) );
+        assertEquals( "MissingErrorCode (4,more,than,2)", I18n.err( "MissingErrorCode", 4, "more", "than", 2 ) );
+    }
+
+
+    @Test
+    public void testMessageTranslationMissing()
+    {
+        assertEquals( "MissingMessage ()", I18n.err( "MissingMessage" ) );
+        assertEquals( "MissingMessage (1)", I18n.err( "MissingMessage", 1 ) );
+        assertEquals( "MissingMessage (3,2)", I18n.err( "MissingMessage", 3, 2 ) );
+        assertEquals( "MissingMessage (4,more,than,2)", I18n.err( "MissingMessage", 4, "more", "than", 2 ) );
+    }
+}

Propchange: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/MissingErrorCodeTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/MissingErrorCodeTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/UnknownLanguageTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/UnknownLanguageTest.java?rev=901657&view=auto
==============================================================================
--- directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/UnknownLanguageTest.java (added)
+++ directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/UnknownLanguageTest.java Thu Jan 21 11:27:15 2010
@@ -0,0 +1,65 @@
+/*
+ *   Licensed to the Apache Software Foundation (ASF) under one
+ *   or more contributor license agreements.  See the NOTICE file
+ *   distributed with this work for additional information
+ *   regarding copyright ownership.  The ASF licenses this file
+ *   to you under the Apache License, Version 2.0 (the
+ *   "License"); you may not use this file except in compliance
+ *   with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing,
+ *   software distributed under the License is distributed on an
+ *   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *   KIND, either express or implied.  See the License for the
+ *   specific language governing permissions and limitations
+ *   under the License.
+ *
+ */
+
+package org.apache.directory.server.i18n;
+
+
+import static org.junit.Assert.assertEquals;
+
+import java.util.Locale;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+
+/**
+ * Test when no translation available for current locale -> use default translation.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class UnknownLanguageTest
+{
+
+    @BeforeClass
+    public static void setup() throws Exception
+    {
+        Locale.setDefault( Locale.TRADITIONAL_CHINESE );
+    }
+
+
+    @Test
+    public void testErrorTranslationUnknownLocale()
+    {
+        assertEquals( "ERR_1 This is error 1", I18n.err( I18n.ERR_1 ) );
+        assertEquals( "ERR_2 This is error 2 with 1 parameter", I18n.err( I18n.ERR_2, 1 ) );
+        assertEquals( "ERR_3 This is error 3 with 2 parameters", I18n.err( I18n.ERR_3, 3, 2 ) );
+        assertEquals( "ERR_4 This is error 4 with more than 2 parameters", I18n.err( I18n.ERR_4, 4, "more", "than", 2 ) );
+    }
+
+
+    @Test
+    public void testMessageTranslationUnknownLocale()
+    {
+        assertEquals( "This is message 1", I18n.msg( "MSG_1" ) );
+        assertEquals( "This is message 2 with 1 parameter", I18n.msg( "MSG_2", 1 ) );
+        assertEquals( "This is message 3 with 2 parameters", I18n.msg( "MSG_3", 3, 2 ) );
+        assertEquals( "This is message 4 with more than 2 parameters", I18n.msg( "MSG_4", 4, "more", "than", 2 ) );
+    }
+}

Propchange: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/UnknownLanguageTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/i18n/src/test/java/org/apache/directory/server/i18n/UnknownLanguageTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors.properties?rev=901657&view=auto
==============================================================================
--- directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors.properties (added)
+++ directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors.properties Thu Jan 21 11:27:15 2010
@@ -0,0 +1,24 @@
+#
+#   Licensed to the Apache Software Foundation (ASF) under one
+#   or more contributor license agreements.  See the NOTICE file
+#   distributed with this work for additional information
+#   regarding copyright ownership.  The ASF licenses this file
+#   to you under the Apache License, Version 2.0 (the
+#   "License"); you may not use this file except in compliance
+#   with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+#
+#
+
+ERR_1=This is error 1
+ERR_2=This is error 2 with {0} parameter
+ERR_3=This is error {0} with {1} parameters
+ERR_4=This is error {0} with {1} {2} {3} parameters
\ No newline at end of file

Propchange: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors_de.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors_de.properties?rev=901657&view=auto
==============================================================================
--- directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors_de.properties (added)
+++ directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors_de.properties Thu Jan 21 11:27:15 2010
@@ -0,0 +1,24 @@
+#
+#   Licensed to the Apache Software Foundation (ASF) under one
+#   or more contributor license agreements.  See the NOTICE file
+#   distributed with this work for additional information
+#   regarding copyright ownership.  The ASF licenses this file
+#   to you under the Apache License, Version 2.0 (the
+#   "License"); you may not use this file except in compliance
+#   with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+#
+#
+
+ERR_1=Das ist Fehler 1
+ERR_2=Das ist Fehler 2 mit {0} Parameter
+ERR_3=Das ist Fehler {0} mit {1} Parameter
+ERR_4=Das ist Fehler {0} mit {1} {2} {3} Parameter
\ No newline at end of file

Propchange: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors_de.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/errors_de.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages.properties?rev=901657&view=auto
==============================================================================
--- directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages.properties (added)
+++ directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages.properties Thu Jan 21 11:27:15 2010
@@ -0,0 +1,24 @@
+#
+#   Licensed to the Apache Software Foundation (ASF) under one
+#   or more contributor license agreements.  See the NOTICE file
+#   distributed with this work for additional information
+#   regarding copyright ownership.  The ASF licenses this file
+#   to you under the Apache License, Version 2.0 (the
+#   "License"); you may not use this file except in compliance
+#   with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+#
+#
+
+MSG_1=This is message 1
+MSG_2=This is message 2 with {0} parameter
+MSG_3=This is message {0} with {1} parameters
+MSG_4=This is message {0} with {1} {2} {3} parameters
\ No newline at end of file

Propchange: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages_de.properties?rev=901657&view=auto
==============================================================================
--- directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages_de.properties (added)
+++ directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages_de.properties Thu Jan 21 11:27:15 2010
@@ -0,0 +1,24 @@
+#
+#   Licensed to the Apache Software Foundation (ASF) under one
+#   or more contributor license agreements.  See the NOTICE file
+#   distributed with this work for additional information
+#   regarding copyright ownership.  The ASF licenses this file
+#   to you under the Apache License, Version 2.0 (the
+#   "License"); you may not use this file except in compliance
+#   with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#   Unless required by applicable law or agreed to in writing,
+#   software distributed under the License is distributed on an
+#   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#   KIND, either express or implied.  See the License for the
+#   specific language governing permissions and limitations
+#   under the License.
+#
+#
+
+MSG_1=Das ist Nachricht 1
+MSG_2=Das ist Nachricht 2 mit {0} Parameter
+MSG_3=Das ist Nachricht {0} mit {1} Parameter
+MSG_4=Das ist Nachricht {0} mit {1} {2} {3} Parameter
\ No newline at end of file

Propchange: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages_de.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/apacheds/trunk/i18n/src/test/resources/org/apache/directory/server/i18n/messages_de.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: directory/apacheds/trunk/interceptor-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptor-kerberos/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptor-kerberos/pom.xml (original)
+++ directory/apacheds/trunk/interceptor-kerberos/pom.xml Thu Jan 21 11:27:15 2010
@@ -37,6 +37,12 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-core</artifactId>
       <version>${pom.version}</version>
     </dependency>

Modified: directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java (original)
+++ directory/apacheds/trunk/interceptor-kerberos/src/main/java/org/apache/directory/server/core/kerberos/KeyDerivationInterceptor.java Thu Jan 21 11:27:15 2010
@@ -57,6 +57,7 @@
 import org.apache.directory.server.core.schema.SchemaInterceptor;
 import org.apache.directory.server.core.subtree.SubentryInterceptor;
 import org.apache.directory.server.core.trigger.TriggerInterceptor;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.KerberosKeyFactory;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.RandomKeyFactory;
@@ -411,7 +412,7 @@
             }
             catch ( IOException ioe )
             {
-                log.error( "Error encoding EncryptionKey.", ioe );
+                log.error( I18n.err( I18n.ERR_122 ), ioe );
             }
         }
 
@@ -430,7 +431,7 @@
             }
             catch ( KerberosException ke )
             {
-                log.debug( ke.getMessage(), ke );
+                log.debug( ke.getLocalizedMessage(), ke );
                 return null;
             }
         }

Modified: directory/apacheds/trunk/jdbm-store/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/pom.xml (original)
+++ directory/apacheds/trunk/jdbm-store/pom.xml Thu Jan 21 11:27:15 2010
@@ -43,6 +43,12 @@
   <dependencies>
     <dependency>
       <groupId>${pom.groupId}</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>${pom.groupId}</groupId>
       <version>${pom.version}</version>
       <artifactId>apacheds-jdbm</artifactId>
     </dependency>

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmStore.java Thu Jan 21 11:27:15 2010
@@ -40,6 +40,7 @@
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.entry.ServerAttribute;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexCursor;
 import org.apache.directory.server.xdbm.IndexEntry;
@@ -429,8 +430,7 @@
                 }
                 else
                 {
-                    LOG.error( "Cannot build an index for attribute '{}', no EQUALITY MatchingRule defined",
-                        attributeType.getName() );
+                    LOG.error( I18n.err( I18n.ERR_123, attributeType.getName() ) );
                 }
             }
             
@@ -472,7 +472,7 @@
             }
             catch ( Throwable t )
             {
-                LOG.error( "Failed to close an index.", t );
+                LOG.error( I18n.err( I18n.ERR_124 ), t );
                 errors.addThrowable( t );
             }
         }
@@ -480,11 +480,11 @@
         try
         {
             master.close();
-            LOG.debug( "Closed master table for {} partition.", suffixDn );
+            LOG.debug( I18n.err( I18n.ERR_125, suffixDn ) );
         }
         catch ( Throwable t )
         {
-            LOG.error( "Failed to close the master.", t );
+            LOG.error( I18n.err( I18n.ERR_126 ), t );
             errors.addThrowable( t );
         }
 
@@ -495,7 +495,7 @@
         }
         catch ( Throwable t )
         {
-            LOG.error( "Failed to close the record manager", t );
+            LOG.error( I18n.err( I18n.ERR_127 ), t );
             errors.addThrowable( t );
         }
 
@@ -855,8 +855,9 @@
         }
         catch ( NamingException e )
         {
-            LOG.error( "Failed to identify OID for: " + id, e );
-            throw new IndexNotFoundException( "Failed to identify OID for: " + id, id, e );
+            String msg = I18n.err( I18n.ERR_128, id );
+            LOG.error( msg, e );
+            throw new IndexNotFoundException( msg, id, e );
         }
 
         if ( userIndices.containsKey( id ) )
@@ -864,8 +865,7 @@
             return userIndices.get( id );
         }
 
-        throw new IndexNotFoundException( "A user index on attribute " + id + " ("
-            + name + ") does not exist!" );
+        throw new IndexNotFoundException( I18n.err( I18n.ERR_129, id, name ) );
     }
 
 
@@ -877,8 +877,9 @@
         }
         catch ( NamingException e )
         {
-            LOG.error( "Failed to identify OID for: " + id, e );
-            throw new IndexNotFoundException( "Failed to identify OID for: " + id, id, e );
+            String msg = I18n.err( I18n.ERR_128, id );
+            LOG.error( msg, e );
+            throw new IndexNotFoundException( msg, id, e );
         }
 
         if ( systemIndices.containsKey( id ) )
@@ -886,8 +887,7 @@
             return systemIndices.get( id );
         }
 
-        throw new IndexNotFoundException( "A system index on attribute " + id + " ("
-            + name + ") does not exist!" );
+        throw new IndexNotFoundException( I18n.err( I18n.ERR_130, id, name ) );
     }
 
 

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/JdbmTable.java Thu Jan 21 11:27:15 2010
@@ -33,6 +33,7 @@
 import org.apache.directory.server.core.avltree.ArrayTree;
 import org.apache.directory.server.core.avltree.ArrayTreeCursor;
 import org.apache.directory.server.core.avltree.Marshaller;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.xdbm.Table;
 import org.apache.directory.shared.ldap.cursor.Cursor;
 import org.apache.directory.shared.ldap.cursor.EmptyCursor;
@@ -684,7 +685,7 @@
         }
         catch ( Exception e )
         {
-            LOG.error( "Error while adding " + key + " on table " + name, e );
+            LOG.error( I18n.err( I18n.ERR_131, key, name ), e );
             throw e;
         }
     }
@@ -795,7 +796,7 @@
         }
         catch ( Exception e )
         {
-            LOG.error( "Error while adding " + key + ", " + value + " on table " + name, e );
+            LOG.error( I18n.err( I18n.ERR_132, key, value, name ), e );
         }
     }
 
@@ -870,7 +871,7 @@
         }
         catch ( Exception e )
         {
-            LOG.error(  "Exception while removing " + key + " from index " + name, e );
+            LOG.error( I18n.err( I18n.ERR_133, key, name ), e );
             
             if ( e instanceof IOException )
             {

Modified: directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java (original)
+++ directory/apacheds/trunk/jdbm-store/src/main/java/org/apache/directory/server/core/partition/impl/btree/jdbm/ServerEntrySerializer.java Thu Jan 21 11:27:15 2010
@@ -28,6 +28,7 @@
 import jdbm.helper.Serializer;
 
 import org.apache.directory.server.core.entry.DefaultServerEntry;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.ldap.schema.SchemaManager;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -155,7 +156,7 @@
         }
         catch ( ClassNotFoundException cnfe )
         {
-            LOG.error( "Cannot deserialize the entry :" + cnfe.getMessage() );
+            LOG.error( I18n.err( I18n.ERR_134, cnfe.getLocalizedMessage() ) );
             return null;
         }
     }

Modified: directory/apacheds/trunk/jdbm/src/main/java/jdbm/RecordManagerFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/main/java/jdbm/RecordManagerFactory.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/main/java/jdbm/RecordManagerFactory.java (original)
+++ directory/apacheds/trunk/jdbm/src/main/java/jdbm/RecordManagerFactory.java Thu Jan 21 11:27:15 2010
@@ -108,7 +108,7 @@
             throw new IllegalArgumentException( "Invalid record manager provider: "
                                                 + provider
                                                 + "\n[" + except.getClass().getName()
-                                                + ": " + except.getMessage()
+                                                + ": " + except.getLocalizedMessage()
                                                 + "]" );
         }
         return factory.createRecordManager( name, options );

Modified: directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BPage.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BPage.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BPage.java (original)
+++ directory/apacheds/trunk/jdbm/src/main/java/jdbm/btree/BPage.java Thu Jan 21 11:27:15 2010
@@ -985,7 +985,7 @@
                 }
             }
         } catch ( ClassNotFoundException except ) {
-            throw new IOException( except.getMessage() );
+            throw new IOException( except.getLocalizedMessage() );
         }
         
         if ( bpage._isLeaf ) {
@@ -1002,7 +1002,7 @@
                     }
                 }
             } catch ( ClassNotFoundException except ) {
-                throw new IOException( except.getMessage() );
+                throw new IOException( except.getLocalizedMessage() );
             }
         } else {
             bpage._children = new long[ _btree._pageSize ];

Modified: directory/apacheds/trunk/jdbm/src/main/java/jdbm/helper/WrappedRuntimeException.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/main/java/jdbm/helper/WrappedRuntimeException.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/main/java/jdbm/helper/WrappedRuntimeException.java (original)
+++ directory/apacheds/trunk/jdbm/src/main/java/jdbm/helper/WrappedRuntimeException.java Thu Jan 21 11:27:15 2010
@@ -94,7 +94,7 @@
      */
     public WrappedRuntimeException( Exception except )
     {
-        super( except == null || except.getMessage() == null ? "No message available" : except.getMessage() );
+        super( except == null || except.getLocalizedMessage() == null ? "No message available" : except.getLocalizedMessage() );
 
         if ( except instanceof WrappedRuntimeException &&
              ( (WrappedRuntimeException) except )._except != null )

Modified: directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/CacheRecordManager.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/CacheRecordManager.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/CacheRecordManager.java (original)
+++ directory/apacheds/trunk/jdbm/src/main/java/jdbm/recman/CacheRecordManager.java Thu Jan 21 11:27:15 2010
@@ -224,7 +224,7 @@
                 _cache.put( id, new CacheEntry( recid, obj, serializer, true ) );
             }
         } catch ( CacheEvictionException except ) {
-            throw new IOException( except.getMessage() );
+            throw new IOException( except.getLocalizedMessage() );
         }
     }
 

Modified: directory/apacheds/trunk/kerberos-shared/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/pom.xml (original)
+++ directory/apacheds/trunk/kerberos-shared/pom.xml Thu Jan 21 11:27:15 2010
@@ -36,6 +36,12 @@
   <packaging>jar</packaging>  
 
   <dependencies>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
     <!-- TODO remove dependency on JNDI core -->
     <dependency>
       <groupId>org.apache.directory.server</groupId>

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/components/Ticket.java Thu Jan 21 11:27:15 2010
@@ -26,6 +26,7 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.KerberosConstants;
 import org.apache.directory.server.kerberos.shared.KerberosUtils;
 import org.apache.directory.server.kerberos.shared.exceptions.ErrorType;
@@ -198,8 +199,8 @@
         }
         catch ( ParseException pe )
         {
-            LOG.error( "Cannot create a ticket for the {} KerberosPrincipal, error : {}", serverPrincipal, pe.getMessage() );
-            throw new InvalidTicketException( ErrorType.KRB_ERR_GENERIC, "Cannot create a ticket : " + pe.getMessage() );
+            LOG.error( I18n.err( I18n.ERR_135, serverPrincipal, pe.getLocalizedMessage() ) );
+            throw new InvalidTicketException( ErrorType.KRB_ERR_GENERIC, I18n.err( I18n.ERR_136, pe.getLocalizedMessage() ) );
         }
     }
     
@@ -520,9 +521,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            LOG.error( "Cannot encode the Ticket object, the PDU size is {} when only {} bytes has been allocated", 1
-                + TLV.getNbBytes( ticketLength ) + ticketLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            LOG.error( I18n.err( I18n.ERR_137, 1 + TLV.getNbBytes( ticketLength ) + ticketLength, 
+                buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/AuthorizationData.java Thu Jan 21 11:27:15 2010
@@ -25,6 +25,7 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.messages.Encodable;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -178,10 +179,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            log.error(
-                "Cannot encode the AuthorizationData object, the PDU size is {} when only {} bytes has been allocated",
-                1 + TLV.getNbBytes( authorizationDataLength ) + authorizationDataLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            log.error( I18n.err( I18n.ERR_139, 1 + TLV.getNbBytes( authorizationDataLength ) + 
+                authorizationDataLength, buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/Checksum.java Thu Jan 21 11:27:15 2010
@@ -24,6 +24,7 @@
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumType;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -240,9 +241,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            log.error( "Cannot encode the Checksum object, the PDU size is {} when only {} bytes has been allocated", 1
-                + TLV.getNbBytes( checksumLength ) + checksumLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            log.error( I18n.err( I18n.ERR_140, 1 + TLV.getNbBytes( checksumLength ) + checksumLength,
+                buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptedData.java Thu Jan 21 11:27:15 2010
@@ -23,6 +23,7 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -295,10 +296,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            log.error(
-                "Cannot encode the EncryptedData object, the PDU size is {} when only {} bytes has been allocated", 1
-                    + TLV.getNbBytes( encryptedDataSeqLength ) + encryptedDataSeqLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            log.error( I18n.err( I18n.ERR_141, 1 + TLV.getNbBytes( encryptedDataSeqLength ) 
+                + encryptedDataSeqLength, buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/EncryptionKey.java Thu Jan 21 11:27:15 2010
@@ -24,6 +24,7 @@
 import java.nio.ByteBuffer;
 import java.util.Arrays;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -289,10 +290,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            log.error(
-                "Cannot encode the EncryptionKey object, the PDU size is {} when only {} bytes has been allocated", 1
-                    + TLV.getNbBytes( encryptionKeyLength ) + encryptionKeyLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            log.error( I18n.err( I18n.ERR_142, 1 + TLV.getNbBytes( encryptionKeyLength )
+                + encryptionKeyLength, buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddress.java Thu Jan 21 11:27:15 2010
@@ -25,6 +25,7 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.messages.value.types.HostAddrType;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -263,10 +264,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            LOG.error(
-                "Cannot encode the HostAddress object, the PDU size is {} when only {} bytes has been allocated", 1
-                    + TLV.getNbBytes( hostAddressLength ) + hostAddressLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            LOG.error( I18n.err( I18n.ERR_143, 1 + TLV.getNbBytes( hostAddressLength )
+                + hostAddressLength, buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/HostAddresses.java Thu Jan 21 11:27:15 2010
@@ -26,6 +26,7 @@
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
 import org.apache.directory.shared.asn1.ber.tlv.UniversalTag;
@@ -236,10 +237,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            LOG.error(
-                "Cannot encode the HostAddresses object, the PDU size is {} when only {} bytes has been allocated", 1
-                    + TLV.getNbBytes( addressesLength ) + addressesLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            LOG.error( I18n.err( I18n.ERR_144, 1 + TLV.getNbBytes( addressesLength )
+                + addressesLength, buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PaData.java Thu Jan 21 11:27:15 2010
@@ -23,6 +23,7 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PaDataType;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -228,9 +229,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            log.error( "Cannot encode the PreAuthenticationData object, the PDU size is {} when only {} bytes has been allocated", 1
-                + TLV.getNbBytes( preAuthenticationDataSeqLength ) + preAuthenticationDataSeqLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            log.error( I18n.err( I18n.ERR_145, 1 + TLV.getNbBytes( preAuthenticationDataSeqLength )
+                + preAuthenticationDataSeqLength, buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/PrincipalName.java Thu Jan 21 11:27:15 2010
@@ -95,6 +95,7 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.KerberosUtils;
 import org.apache.directory.server.kerberos.shared.messages.value.types.PrincipalNameType;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
@@ -423,10 +424,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            LOG.error(
-                "Cannot encode the principalName object, the PDU size is {} when only {} bytes has been allocated", 1
-                    + TLV.getNbBytes( principalNameSeqLength ) + principalNameSeqLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            LOG.error( I18n.err( I18n.ERR_146, 1 + TLV.getNbBytes( principalNameSeqLength )
+                + principalNameSeqLength, buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/messages/value/TransitedEncoding.java Thu Jan 21 11:27:15 2010
@@ -23,6 +23,7 @@
 import java.nio.BufferOverflowException;
 import java.nio.ByteBuffer;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.messages.value.types.TransitedEncodingType;
 import org.apache.directory.shared.asn1.AbstractAsn1Object;
 import org.apache.directory.shared.asn1.ber.tlv.TLV;
@@ -202,7 +203,7 @@
     {
         if ( buffer == null )
         {
-            throw new EncoderException( "Cannot put a PDU in a null buffer !" );
+            throw new EncoderException( I18n.err( I18n.ERR_148 ) );
         }
 
         try
@@ -223,10 +224,9 @@
         }
         catch ( BufferOverflowException boe )
         {
-            log.error(
-                "Cannot encode the TransitedEncoding object, the PDU size is {} when only {} bytes has been allocated",
-                1 + TLV.getNbBytes( transitedEncodingLength ) + transitedEncodingLength, buffer.capacity() );
-            throw new EncoderException( "The PDU buffer size is too small !" );
+            log.error( I18n.err( I18n.ERR_147, 1 + TLV.getNbBytes( transitedEncodingLength )
+                + transitedEncodingLength, buffer.capacity() ) );
+            throw new EncoderException( I18n.err( I18n.ERR_138 ) );
         }
 
         if ( IS_DEBUG )

Modified: directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java (original)
+++ directory/apacheds/trunk/kerberos-shared/src/main/java/org/apache/directory/server/kerberos/shared/store/operations/StoreUtils.java Thu Jan 21 11:27:15 2010
@@ -23,6 +23,7 @@
 import org.apache.directory.server.core.entry.ServerEntry;
 import org.apache.directory.server.core.entry.ServerStringValue;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
 import org.apache.directory.server.kerberos.shared.io.encoder.EncryptionKeyEncoder;
 import org.apache.directory.server.kerberos.shared.messages.value.EncryptionKey;
@@ -137,8 +138,7 @@
                 
                 while ( cursor.next() )
                 {
-                    LOG.error( "More than one server entry found for kerberos principal name {}: ", 
-                        principal, cursor.next() );
+                    LOG.error( I18n.err( I18n.ERR_149, principal, cursor.next() ) );
                 }
                 
                 return entry;

Modified: directory/apacheds/trunk/ldif-partition/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/pom.xml (original)
+++ directory/apacheds/trunk/ldif-partition/pom.xml Thu Jan 21 11:27:15 2010
@@ -37,6 +37,12 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-avl-partition</artifactId>
       <version>${pom.version}</version>
     </dependency>

Modified: directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java (original)
+++ directory/apacheds/trunk/ldif-partition/src/main/java/org/apache/directory/server/core/partition/ldif/LdifPartition.java Thu Jan 21 11:27:15 2010
@@ -44,6 +44,7 @@
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.avl.AvlPartition;
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.server.xdbm.IndexCursor;
 import org.apache.directory.server.xdbm.IndexEntry;
@@ -178,7 +179,7 @@
         // of the workingDirectory followed by the suffix
         if ( ( suffix == null ) || ( suffix.isEmpty() ) )
         {
-            String msg = "Cannot initialize a partition without a valid suffix";
+            String msg = I18n.err( I18n.ERR_150 );
             LOG.error( msg );
             throw new InvalidNameException( msg );
         }
@@ -206,7 +207,7 @@
             }
             catch ( SecurityException se )
             {
-                String msg = "The " + suffixDirectory.getAbsolutePath() + " can't be created : " + se.getMessage(); 
+                String msg = I18n.err( I18n.ERR_151, suffixDirectory.getAbsolutePath(), se.getLocalizedMessage() ); 
                 LOG.error( msg );
                 throw se;
             }

Modified: directory/apacheds/trunk/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/pom.xml (original)
+++ directory/apacheds/trunk/pom.xml Thu Jan 21 11:27:15 2010
@@ -326,6 +326,7 @@
   </dependencies>
 
   <modules>
+    <module>i18n</module>
     <module>all</module>
     <module>utils</module>
     <module>jdbm</module>

Modified: directory/apacheds/trunk/protocol-changepw/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/pom.xml (original)
+++ directory/apacheds/trunk/protocol-changepw/pom.xml Thu Jan 21 11:27:15 2010
@@ -38,6 +38,11 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-kerberos-shared</artifactId>
       <version>${pom.version}</version>
     </dependency>

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/protocol/ChangePasswordProtocolHandler.java Thu Jan 21 11:27:15 2010
@@ -35,6 +35,7 @@
 import org.apache.directory.server.changepw.messages.ChangePasswordRequest;
 import org.apache.directory.server.changepw.service.ChangePasswordContext;
 import org.apache.directory.server.changepw.service.ChangePasswordService;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.exceptions.KerberosException;
 import org.apache.directory.server.kerberos.shared.messages.ErrorMessage;
 import org.apache.directory.server.kerberos.shared.messages.ErrorMessageModifier;
@@ -143,11 +144,11 @@
         {
             if ( log.isDebugEnabled() )
             {
-                log.warn( ke.getMessage(), ke );
+                log.warn( ke.getLocalizedMessage(), ke );
             }
             else
             {
-                log.warn( ke.getMessage() );
+                log.warn( ke.getLocalizedMessage() );
             }
 
             ErrorMessage errorMessage = getErrorMessage( config.getServicePrincipal(), ke );
@@ -159,7 +160,7 @@
         }
         catch ( Exception e )
         {
-            log.error( "Unexpected exception:  " + e.getMessage(), e );
+            log.error( I18n.err( I18n.ERR_152, e.getLocalizedMessage() ), e );
 
             session.write( getErrorMessage( config.getServicePrincipal(), new ChangePasswordException(
                 ErrorType.KRB5_KPASSWD_UNKNOWN_ERROR ) ) );
@@ -189,7 +190,7 @@
         KerberosTime now = new KerberosTime();
 
         modifier.setErrorCode( exception.getErrorCode() );
-        modifier.setExplanatoryText( exception.getMessage() );
+        modifier.setExplanatoryText( exception.getLocalizedMessage() );
         modifier.setServerPrincipal( principal );
         modifier.setServerTime( now );
         modifier.setServerMicroSecond( 0 );
@@ -210,11 +211,11 @@
         {
             try
             {
-                resultString = exception.getMessage().getBytes( "UTF-8" );
+                resultString = exception.getLocalizedMessage().getBytes( "UTF-8" );
             }
             catch ( UnsupportedEncodingException uee )
             {
-                log.error( uee.getMessage() );
+                log.error( uee.getLocalizedMessage() );
             }
         }
         else

Modified: directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java (original)
+++ directory/apacheds/trunk/protocol-changepw/src/main/java/org/apache/directory/server/changepw/service/ChangePasswordService.java Thu Jan 21 11:27:15 2010
@@ -36,6 +36,7 @@
 import org.apache.directory.server.changepw.messages.ChangePasswordRequest;
 import org.apache.directory.server.changepw.value.ChangePasswordData;
 import org.apache.directory.server.changepw.value.ChangePasswordDataModifier;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.shared.KerberosUtils;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.CipherTextHandler;
 import org.apache.directory.server.kerberos.shared.crypto.encryption.EncryptionType;
@@ -144,7 +145,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in request monitor", e );
+            LOG.error( I18n.err( I18n.ERR_152 ), e );
         }
     }
     
@@ -341,7 +342,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in context monitor", e );
+            LOG.error( I18n.err( I18n.ERR_154 ), e );
         }
     }
     
@@ -429,7 +430,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in reply monitor", e );
+            LOG.error( I18n.err( I18n.ERR_155 ), e );
         }
     }
 }

Modified: directory/apacheds/trunk/protocol-dns/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/pom.xml (original)
+++ directory/apacheds/trunk/protocol-dns/pom.xml Thu Jan 21 11:27:15 2010
@@ -37,6 +37,12 @@
 
   <dependencies>
 
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
     <!-- TODO remove dependency on JNDI core -->
     <dependency>
       <groupId>org.apache.directory.server</groupId>

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/io/encoder/DnsMessageEncoder.java Thu Jan 21 11:27:15 2010
@@ -152,7 +152,7 @@
             }
             catch ( IOException ioe )
             {
-                log.error( ioe.getMessage(), ioe );
+                log.error( ioe.getLocalizedMessage(), ioe );
             }
         }
     }

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/protocol/DnsProtocolHandler.java Thu Jan 21 11:27:15 2010
@@ -132,7 +132,7 @@
         }
         catch ( Exception e )
         {
-            LOG.error( e.getMessage(), e );
+            LOG.error( e.getLocalizedMessage(), e );
 
             DnsMessage request = ( DnsMessage ) message;
             DnsException de = ( DnsException ) e;

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DomainNameService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DomainNameService.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DomainNameService.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/DomainNameService.java Thu Jan 21 11:27:15 2010
@@ -34,6 +34,7 @@
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResponseCode;
 import org.apache.directory.server.dns.store.RecordStore;
+import org.apache.directory.server.i18n.I18n;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -84,7 +85,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in request monitor", e );
+            LOG.error( I18n.err( I18n.ERR_153 ), e );
         }
     }
     
@@ -146,7 +147,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in context monitor", e );
+            LOG.error( I18n.err( I18n.ERR_154 ), e );
         }
     }
     
@@ -188,7 +189,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in reply monitor", e );
+            LOG.error( I18n.err( I18n.ERR_155 ), e );
         }
     }
     

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/MonitorContext.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/MonitorContext.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/MonitorContext.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/service/MonitorContext.java Thu Jan 21 11:27:15 2010
@@ -24,6 +24,7 @@
 
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.store.RecordStore;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.mina.core.session.IoSession;
 import org.apache.mina.handler.chain.IoHandlerCommand;
 import org.slf4j.Logger;
@@ -62,7 +63,7 @@
             catch ( Exception e )
             {
                 // This is a monitor.  No exceptions should bubble up.
-                log.error( "Error in context monitor", e );
+                log.error( I18n.err( I18n.ERR_154 ), e );
             }
         }
 

Modified: directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/MultiBaseSearch.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/MultiBaseSearch.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/MultiBaseSearch.java (original)
+++ directory/apacheds/trunk/protocol-dns/src/main/java/org/apache/directory/server/dns/store/jndi/MultiBaseSearch.java Thu Jan 21 11:27:15 2010
@@ -28,6 +28,7 @@
 import org.apache.directory.server.dns.messages.ResourceRecord;
 import org.apache.directory.server.dns.messages.ResponseCode;
 import org.apache.directory.server.dns.store.jndi.operations.GetRecords;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.protocol.shared.ServiceConfigurationException;
 import org.apache.directory.server.protocol.shared.catalog.Catalog;
 import org.apache.directory.server.protocol.shared.catalog.GetCatalog;
@@ -70,8 +71,8 @@
         }
         catch ( Exception e )
         {
-            LOG.error( e.getMessage(), e );
-            String message = "Failed to get catalog context " + catalogBaseDn;
+            LOG.error( e.getLocalizedMessage(), e );
+            String message = I18n.err( I18n.ERR_156, catalogBaseDn );
             throw new ServiceConfigurationException( message, e );
         }
     }
@@ -95,8 +96,8 @@
         }
         catch ( NamingException ne )
         {
-            LOG.error( ne.getMessage(), ne );
-            String message = "Failed to get initial context " + question.getDomainName();
+            LOG.error( ne.getLocalizedMessage(), ne );
+            String message = I18n.err( I18n.ERR_157, question.getDomainName() );
             throw new ServiceConfigurationException( message, ne );
         }
         catch ( Exception e )

Modified: directory/apacheds/trunk/protocol-kerberos/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/pom.xml (original)
+++ directory/apacheds/trunk/protocol-kerberos/pom.xml Thu Jan 21 11:27:15 2010
@@ -41,6 +41,12 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-kerberos-shared</artifactId>
       <version>${pom.version}</version>
     </dependency>

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/authentication/AuthenticationService.java Thu Jan 21 11:27:15 2010
@@ -28,6 +28,7 @@
 import javax.security.auth.kerberos.KerberosKey;
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.kdc.KdcContext;
 import org.apache.directory.server.kerberos.kdc.KdcServer;
 import org.apache.directory.server.kerberos.sam.SamException;
@@ -635,7 +636,7 @@
             catch ( Exception e )
             {
                 // This is a monitor.  No exceptions should bubble up.
-                LOG.error( "Error in request monitor", e );
+                LOG.error( I18n.err( I18n.ERR_153 ), e );
             }
         }
     }
@@ -684,7 +685,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in context monitor", e );
+            LOG.error( I18n.err( I18n.ERR_154 ), e );
         }
     }
     
@@ -722,7 +723,7 @@
                 catch ( Exception e )
                 {
                     // This is a monitor.  No exceptions should bubble up.
-                    LOG.error( "Error in reply monitor", e );
+                    LOG.error( I18n.err( I18n.ERR_155 ), e );
                 }
             }
         }

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/kdc/ticketgrant/TicketGrantingService.java Thu Jan 21 11:27:15 2010
@@ -28,6 +28,7 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.kdc.KdcContext;
 import org.apache.directory.server.kerberos.kdc.KdcServer;
 import org.apache.directory.server.kerberos.shared.KerberosConstants;
@@ -160,7 +161,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in request monitor", e );
+            LOG.error( I18n.err( I18n.ERR_153 ), e );
         }
     }
     
@@ -484,7 +485,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            LOG.error( "Error in context monitor", e );
+            LOG.error( I18n.err( I18n.ERR_154 ), e );
         }
     }
 
@@ -520,7 +521,7 @@
             catch ( Exception e )
             {
                 // This is a monitor.  No exceptions should bubble up.
-                LOG.error( "Error in reply monitor", e );
+                LOG.error( I18n.err( I18n.ERR_155 ), e );
             }
         }
     }

Modified: directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java (original)
+++ directory/apacheds/trunk/protocol-kerberos/src/main/java/org/apache/directory/server/kerberos/protocol/KerberosProtocolHandler.java Thu Jan 21 11:27:15 2010
@@ -25,6 +25,7 @@
 
 import javax.security.auth.kerberos.KerberosPrincipal;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.kerberos.kdc.KdcServer;
 import org.apache.directory.server.kerberos.kdc.authentication.AuthenticationContext;
 import org.apache.directory.server.kerberos.kdc.authentication.AuthenticationService;
@@ -169,7 +170,7 @@
         }
         catch ( KerberosException ke )
         {
-            String messageText = ke.getMessage() + " (" + ke.getErrorCode() + ")";
+            String messageText = ke.getLocalizedMessage() + " (" + ke.getErrorCode() + ")";
 
             if ( log.isDebugEnabled() )
             {
@@ -192,7 +193,7 @@
         catch ( Exception e )
         {
         e.printStackTrace();
-            log.error( "Unexpected exception:  " + e.getMessage(), e );
+            log.error( I18n.err( I18n.ERR_152, e.getLocalizedMessage() ), e );
 
             session.write( getErrorMessage( config.getServicePrincipal(), new KerberosException(
                 ErrorType.KDC_ERR_SVC_UNAVAILABLE ) ) );
@@ -216,7 +217,7 @@
         KerberosTime now = new KerberosTime();
 
         modifier.setErrorCode( exception.getErrorCode() );
-        modifier.setExplanatoryText( exception.getMessage() );
+        modifier.setExplanatoryText( exception.getLocalizedMessage() );
         modifier.setServerPrincipal( principal );
         modifier.setServerTime( now );
         modifier.setServerMicroSecond( 0 );
@@ -245,7 +246,7 @@
         catch ( Exception e )
         {
             // This is a monitor.  No exceptions should bubble up.
-            log.error( "Error in reply monitor", e );
+            log.error( I18n.err( I18n.ERR_155 ), e );
         }
     }
 }

Modified: directory/apacheds/trunk/protocol-ldap/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/pom.xml?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/pom.xml (original)
+++ directory/apacheds/trunk/protocol-ldap/pom.xml Thu Jan 21 11:27:15 2010
@@ -38,6 +38,12 @@
   <dependencies>
     <dependency>
       <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-i18n</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
       <artifactId>apacheds-kerberos-shared</artifactId>
       <version>${pom.version}</version>
     </dependency>

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapServer.java Thu Jan 21 11:27:15 2010
@@ -40,6 +40,7 @@
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.partition.PartitionNexus;
 import org.apache.directory.server.core.security.CoreKeyStoreSpi;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.handlers.AbandonHandler;
 import org.apache.directory.server.ldap.handlers.AddHandler;
 import org.apache.directory.server.ldap.handlers.BindHandler;
@@ -577,7 +578,7 @@
         }
         catch ( IOException e )
         {
-            String msg = "Failed to bind an LDAP service (" + transport.getPort() + ") to the service registry.";
+            String msg = I18n.err( I18n.ERR_171, transport.getPort() );
             LdapConfigurationException lce = new LdapConfigurationException( msg );
             lce.setRootCause( e );
             LOG.error( msg, e );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/LdapSession.java Thu Jan 21 11:27:15 2010
@@ -29,6 +29,7 @@
 import org.apache.directory.server.core.CoreSession;
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.filtering.EntryFilteringCursor;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.handlers.controls.PagedSearchContext;
 import org.apache.directory.shared.ldap.message.InternalAbandonableRequest;
 import org.apache.directory.shared.ldap.message.BindStatus;
@@ -408,7 +409,7 @@
                     }
                     catch ( Exception e )
                     {
-                        LOG.error( "Failing on cursor close : {}", e.getMessage() );
+                        LOG.error( I18n.err( I18n.ERR_172, e.getLocalizedMessage() ) );
                     }
                 }
             }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/gui/SessionsFrame.java Thu Jan 21 11:27:15 2010
@@ -45,6 +45,7 @@
 import javax.swing.event.ListSelectionEvent;
 import javax.swing.event.ListSelectionListener;
 
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.extended.GracefulShutdownHandler;
@@ -837,8 +838,8 @@
                     }
                     catch ( IOException e1 )
                     {
-                        LOG.error( "failed to rebind ldap service", e1 );
-                        JOptionPane.showMessageDialog( SessionsFrame.this, e1.getMessage(), "Error encountered!",
+                        LOG.error( I18n.err( I18n.ERR_158 ), e1 );
+                        JOptionPane.showMessageDialog( SessionsFrame.this, e1.getLocalizedMessage(), "Error encountered!",
                             JOptionPane.ERROR_MESSAGE );
                     }
                 }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/BindHandler.java Thu Jan 21 11:27:15 2010
@@ -32,6 +32,7 @@
 import org.apache.directory.server.core.LdapPrincipal;
 import org.apache.directory.server.core.entry.ClonedServerEntry;
 import org.apache.directory.server.core.interceptor.context.BindOperationContext;
+import org.apache.directory.server.i18n.I18n;
 import org.apache.directory.server.ldap.LdapProtocolUtils;
 import org.apache.directory.server.ldap.LdapSession;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
@@ -199,7 +200,7 @@
                 result.setResultCode( code );
             }
 
-            String msg = code.toString() + ": Bind failed: " + e.getMessage();
+            String msg = code.toString() + ": Bind failed: " + e.getLocalizedMessage();
 
             if ( LOG.isDebugEnabled() )
             {
@@ -235,8 +236,7 @@
         // Guard clause:  Reject unsupported SASL mechanisms.
         if ( !ldapServer.getSupportedMechanisms().contains( saslMechanism ) )
         {
-            LOG.error( "Bind error : {} mechanism not supported. Please check the server.xml "
-                + "configuration file (supportedMechanisms field)", saslMechanism );
+            LOG.error( I18n.err( I18n.ERR_160, saslMechanism ) );
 
             return false;
         }
@@ -370,7 +370,7 @@
 
         if ( e != null )
         {
-            message = ResultCodeEnum.INVALID_CREDENTIALS + ": " + e.getMessage();
+            message = ResultCodeEnum.INVALID_CREDENTIALS + ": " + e.getLocalizedMessage();
         }
         else
         {
@@ -445,7 +445,7 @@
 
         if ( mechanismHandler == null )
         {
-            String message = "Handler unavailable for " + saslMechanism;
+            String message = I18n.err( I18n.ERR_161, saslMechanism );
 
             // Clear the saslProperties, and move to the anonymous state
             ldapSession.clearSaslProperties();
@@ -576,10 +576,10 @@
         // Guard clause:  LDAP version 3
         if ( !bindRequest.getVersion3() )
         {
-            LOG.error( "Bind error : Only LDAP v3 is supported." );
+            LOG.error( I18n.err( I18n.ERR_162 ) );
             InternalLdapResult bindResult = bindRequest.getResultResponse().getLdapResult();
             bindResult.setResultCode( ResultCodeEnum.PROTOCOL_ERROR );
-            bindResult.setErrorMessage( "Only LDAP v3 is supported." );
+            bindResult.setErrorMessage( I18n.err( I18n.ERR_163 ) );
             ldapSession.getIoSession().write( bindRequest.getResultResponse() );
             return;
         }

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java?rev=901657&r1=901656&r2=901657&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java (original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/LdapRequestHandler.java Thu Jan 21 11:27:15 2010
@@ -227,7 +227,7 @@
          * exception into the message if we are in debug mode.  Note we 
          * embed the result code name into the message.
          */
-        String msg = code.toString() + ": failed for " + req + ": " + e.getMessage();
+        String msg = code.toString() + ": failed for " + req + ": " + e.getLocalizedMessage();
 
         if ( LOG.isDebugEnabled() )
         {