You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2014/11/06 01:47:34 UTC

svn commit: r1637021 - in /directory/shared/trunk: i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java

Author: elecharny
Date: Thu Nov  6 00:47:33 2014
New Revision: 1637021

URL: http://svn.apache.org/r1637021
Log:
Added the line number in the log, to complete DIRAPI-174

Modified:
    directory/shared/trunk/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties
    directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java

Modified: directory/shared/trunk/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties
URL: http://svn.apache.org/viewvc/directory/shared/trunk/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties?rev=1637021&r1=1637020&r2=1637021&view=diff
==============================================================================
--- directory/shared/trunk/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties (original)
+++ directory/shared/trunk/i18n/src/main/resources/org/apache/directory/api/i18n/errors.properties Thu Nov  6 00:47:33 2014
@@ -684,9 +684,9 @@ ERR_11013=Cannot delete the SchemaObject
 
 # ldif
 ERR_12001_UNKNOWN_CHANGE_TYPE=Unknown change type value {0}
-ERR_12002_ENTRY_WITH_TWO_DNS=An entry must not have two DNs
+ERR_12002_ENTRY_WITH_TWO_DNS=An entry must not have two DNs, at line {0}
 ERR_12003_LDIF_ENTRY_WITH_TWO_DNS=A ldif entry should not have two DNs
-ERR_12004_CHANGE_NOT_ALLOWED=We cannot have changes when reading a file which already contains entries
+ERR_12004_CHANGE_NOT_ALLOWED=We cannot have changes when reading a file which already contains entries, at line {0}
 ERR_12005_NO_CHANGE=No changes within entries
 ERR_12006_EXPECTING_ATTRIBUTE_TYPE=Expecting an attribute type
 ERR_12007_BAD_ATTRIBUTE=Bad attribute
@@ -694,47 +694,47 @@ ERR_12008_CANNOT_PARSE_LDIF_BUFFER=Canno
 ERR_12009_ERROR_PARSING_LDIF_BUFFER=Error while parsing the ldif buffer
 ERR_12010_CANNOT_FIND_FILE=Cannot find file {0}
 ERR_12011_CANNOT_READ_FILE=Cannot read file {0}
-ERR_12012_EMPTY_DN_NOT_ALLOWED=A ldif entry must have a non empty DN
+ERR_12012_EMPTY_DN_NOT_ALLOWED=A ldif entry must have a non empty DN, at line {0}
 ERR_12013_NO_DN=No DN for entry
-ERR_12014_BASE64_DN_EXPECTED=The ldif entry is supposed to have a base 64 encoded DN
+ERR_12014_BASE64_DN_EXPECTED=The ldif entry is supposed to have a base 64 encoded DN, at line {0}
 ERR_12015_INVALID_BASE64_DN=Invalid base 64 encoded DN
-ERR_12016_DN_EXPECTED=A ldif entry must start with a DN
-ERR_12017_INVALID_DN=The DN {0} is not valid
-ERR_12018_FILE_NOT_FOUND=File {0} not found
+ERR_12016_DN_EXPECTED=A ldif entry must start with a DN, at line {0}
+ERR_12017_INVALID_DN=The DN {0} is not valid, at line {1}
+ERR_12018_FILE_NOT_FOUND=File {0} not found, at line {1}
 ERR_12019_BAD_URL_FILE_NOT_FOUND=Bad URL, file not found
-ERR_12020_FILE_TOO_BIG=File {0} is too big
-ERR_12022_ERROR_READING_FILE=File {0} error reading
+ERR_12020_FILE_TOO_BIG=File {0} is too big, at line {1}
+ERR_12022_ERROR_READING_FILE=File {0} error reading, at line {1}
 ERR_12023_ERROR_READING_BAD_URL=Bad URL, file can''t be read
-ERR_12024_CANNOT_CLOSE_FILE=Error while closing the stream : {0}
+ERR_12024_CANNOT_CLOSE_FILE=Error while closing the stream : {0}, at line {1}
 ERR_12025_BAD_PROTOCOL=Protocols other than file: are not supported
-ERR_12026_UNSUPPORTED_PROTOCOL=Unsupported URL protocol
-ERR_12027_BAD_URL=Bad URL {0}
-ERR_12029_CONTROL_WITHOUT_OID=The control does not have an OID
-ERR_12031_INVALID_OID=The OID {0} is not valid
-ERR_12033_INVALID_CRITICALITY=The control must have a valid criticality
-ERR_12035_BAD_MODRDN_OPERATION=A modrdn operation must start with a "newrdn\:"
-ERR_12038_NO_DELETEOLDRDN=A modrdn operation must contains a "deleteoldrdn\:"
-ERR_12040_BAD_MODIFY_SEPARATOR=Bad state : we should have come from an ATTRVAL_SPEC
-ERR_12042_BAD_MODIFY_SEPARATOR_2=Bad state : we should have come from a MOD_SPEC or an ATTRVAL_SPEC
-ERR_12044=The modified attribute and the attribute value spec must be equal
+ERR_12026_UNSUPPORTED_PROTOCOL=Unsupported URL protocol, at line {0}
+ERR_12027_BAD_URL=Bad URL {0}, at line {1}
+ERR_12029_CONTROL_WITHOUT_OID=The control does not have an OID, at line {0}
+ERR_12031_INVALID_OID=The OID {0} is not valid, at line {1}
+ERR_12033_INVALID_CRITICALITY=The control must have a valid criticality, at line {0}
+ERR_12035_BAD_MODRDN_OPERATION=A modrdn operation must start with a "newrdn\:", at line {0}
+ERR_12038_NO_DELETEOLDRDN=A modrdn operation must contains a "deleteoldrdn\:", at line {0}
+ERR_12040_BAD_MODIFY_SEPARATOR=Bad state : we should have come from an ATTRVAL_SPEC, at line {0}
+ERR_12042_BAD_MODIFY_SEPARATOR_2=Bad state : we should have come from a MOD_SPEC or an ATTRVAL_SPEC, at line {0}
+ERR_12044=The modified attribute and the attribute value spec must be equal, at line {0}
 ERR_12045=Bad modify attribute
-ERR_12046=A moddn operation must contains a "newsuperior\:"
+ERR_12046=A moddn operation must contains a "newsuperior\:", at line {0}
 ERR_12047=Bad moddn operation, no newsuperior
-ERR_12048=Unknown operation
+ERR_12048=Unknown operation, at line {0}
 ERR_12049=Bad operation
-ERR_12050=We already have had a control
+ERR_12050=We already have had a control, at line {0}
 ERR_12051=Control misplaced
-ERR_12052=We already have had a changeType
+ERR_12052=We already have had a changeType, at line {0}
 ERR_12053=ChangeType misplaced
-ERR_12054=We can''t have a Attribute/Value pair after a control or a changeType
+ERR_12054=We can''t have a Attribute/Value pair after a control or a changeType, at line {0}
 ERR_12055=AttributeType misplaced
-ERR_12056=Expecting an attribute type
+ERR_12056=Expecting an attribute type, at line {0}
 ERR_12057_BAD_ATTRIBUTE=Bad attribute
-ERR_12058_UNKNOWN_ENTRY_TYPE=Unknown entry type
+ERR_12058_UNKNOWN_ENTRY_TYPE=Unknown entry type, at line {0}
 ERR_12059_UNKNOWN_ENTRY=Unknown entry
-ERR_12060_VERSION_NOT_A_NUMBER=The version is not a number
+ERR_12060_VERSION_NOT_A_NUMBER=The version is not a number, at line {0}
 ERR_12061_LDIF_PARSING_ERROR=Ldif parsing error
-ERR_12062_EMPTY_CONTINUATION_LINE=Cannot have an empty continuation line
+ERR_12062_EMPTY_CONTINUATION_LINE=Cannot have an empty continuation line, at line {0}
 ERR_12063_ERROR_WHILE_READING_LDIF_LINE=Error while reading ldif lines
 ERR_12064_EMPTY_FILE_NAME=Cannot parse an empty file name !
 ERR_12066=Cannot parse the file {0}, it does not exist

Modified: directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java?rev=1637021&r1=1637020&r2=1637021&view=diff
==============================================================================
--- directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java (original)
+++ directory/shared/trunk/ldap/model/src/main/java/org/apache/directory/api/ldap/model/ldif/LdifReader.java Thu Nov  6 00:47:33 2014
@@ -218,7 +218,7 @@ public class LdifReader implements Itera
 
     /** A flag set if the ldif contains changes */
     protected boolean containsChanges;
-    
+
     /** The SchemaManager instance, if any */
     protected SchemaManager schemaManager;
 
@@ -242,7 +242,8 @@ public class LdifReader implements Itera
 
     /** flag to turn on/off of the DN validation. By default DNs are validated after parsing */
     protected boolean validateDn = true;
-    
+
+
     /**
      * Constructors
      */
@@ -253,7 +254,7 @@ public class LdifReader implements Itera
         version = DEFAULT_VERSION;
     }
 
-    
+
     /**
      * Constructors
      */
@@ -385,7 +386,7 @@ public class LdifReader implements Itera
             LOG.error( msg );
             throw new LdapLdifException( msg );
         }
-        
+
         try
         {
             initReader( new BufferedReader( new FileReader( file ) ) );
@@ -429,9 +430,9 @@ public class LdifReader implements Itera
             LOG.error( msg );
             throw new LdapLdifException( msg );
         }
-        
+
         this.schemaManager = schemaManager;
-        
+
         try
         {
             initReader( new BufferedReader( new FileReader( file ) ) );
@@ -604,14 +605,14 @@ public class LdifReader implements Itera
                     catch ( UnsupportedEncodingException uee )
                     {
                         // The Dn is not base 64 encoded
-                        LOG.error( I18n.err( I18n.ERR_12014_BASE64_DN_EXPECTED ) );
+                        LOG.error( I18n.err( I18n.ERR_12014_BASE64_DN_EXPECTED, lineNumber ) );
                         throw new LdapLdifException( I18n.err( I18n.ERR_12015_INVALID_BASE64_DN ), uee );
                     }
                 }
                 else
                 {
                     // The Dn is empty : error
-                    LOG.error( I18n.err( I18n.ERR_12012_EMPTY_DN_NOT_ALLOWED ) );
+                    LOG.error( I18n.err( I18n.ERR_12012_EMPTY_DN_NOT_ALLOWED, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12013_NO_DN ) );
                 }
             }
@@ -622,14 +623,14 @@ public class LdifReader implements Itera
         }
         else
         {
-            LOG.error( I18n.err( I18n.ERR_12016_DN_EXPECTED ) );
+            LOG.error( I18n.err( I18n.ERR_12016_DN_EXPECTED, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12013_NO_DN ) );
         }
 
         // Check that the Dn is valid. If not, an exception will be thrown
         if ( validateDn && !Dn.isValid( dn ) )
         {
-            String message = I18n.err( I18n.ERR_12017_INVALID_DN, dn );
+            String message = I18n.err( I18n.ERR_12017_INVALID_DN, dn, lineNumber );
             LOG.error( message );
             throw new LdapLdifException( message );
         }
@@ -705,7 +706,7 @@ public class LdifReader implements Itera
 
                         if ( !file.exists() )
                         {
-                            LOG.error( I18n.err( I18n.ERR_12018_FILE_NOT_FOUND, fileName ) );
+                            LOG.error( I18n.err( I18n.ERR_12018_FILE_NOT_FOUND, fileName, lineNumber ) );
                             throw new LdapLdifException( I18n.err( I18n.ERR_12019_BAD_URL_FILE_NOT_FOUND ) );
                         }
                         else
@@ -714,7 +715,7 @@ public class LdifReader implements Itera
 
                             if ( length > sizeLimit )
                             {
-                                String message = I18n.err( I18n.ERR_12020_FILE_TOO_BIG, fileName );
+                                String message = I18n.err( I18n.ERR_12020_FILE_TOO_BIG, fileName, lineNumber );
                                 LOG.error( message );
                                 throw new LdapLdifException( message );
                             }
@@ -735,13 +736,13 @@ public class LdifReader implements Itera
                                     // We can't reach this point, the file
                                     // existence has already been
                                     // checked
-                                    LOG.error( I18n.err( I18n.ERR_12018_FILE_NOT_FOUND, fileName ) );
+                                    LOG.error( I18n.err( I18n.ERR_12018_FILE_NOT_FOUND, fileName, lineNumber ) );
                                     throw new LdapLdifException( I18n.err( I18n.ERR_12019_BAD_URL_FILE_NOT_FOUND ),
                                         fnfe );
                                 }
                                 catch ( IOException ioe )
                                 {
-                                    LOG.error( I18n.err( I18n.ERR_12022_ERROR_READING_FILE, fileName ) );
+                                    LOG.error( I18n.err( I18n.ERR_12022_ERROR_READING_FILE, fileName, lineNumber ) );
                                     throw new LdapLdifException( I18n.err( I18n.ERR_12023_ERROR_READING_BAD_URL ), ioe );
                                 }
                                 finally
@@ -755,7 +756,9 @@ public class LdifReader implements Itera
                                     }
                                     catch ( IOException ioe )
                                     {
-                                        LOG.error( I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE, ioe.getMessage() ), ioe );
+                                        LOG.error(
+                                            I18n.err( I18n.ERR_12024_CANNOT_CLOSE_FILE, ioe.getMessage(), lineNumber ),
+                                            ioe );
                                         // Just do nothing ...
                                     }
                                 }
@@ -765,12 +768,12 @@ public class LdifReader implements Itera
                     else
                     {
                         LOG.error( I18n.err( I18n.ERR_12025_BAD_PROTOCOL ) );
-                        throw new LdapLdifException( I18n.err( I18n.ERR_12026_UNSUPPORTED_PROTOCOL ) );
+                        throw new LdapLdifException( I18n.err( I18n.ERR_12026_UNSUPPORTED_PROTOCOL, lineNumber ) );
                     }
                 }
                 catch ( MalformedURLException mue )
                 {
-                    String message = I18n.err( I18n.ERR_12027_BAD_URL, urlName );
+                    String message = I18n.err( I18n.ERR_12027_BAD_URL, urlName, lineNumber );
                     LOG.error( message );
                     throw new LdapLdifException( message, mue );
                 }
@@ -849,7 +852,7 @@ public class LdifReader implements Itera
         if ( pos > length )
         {
             // No OID : error !
-            LOG.error( I18n.err( I18n.ERR_12029_CONTROL_WITHOUT_OID ) );
+            LOG.error( I18n.err( I18n.ERR_12029_CONTROL_WITHOUT_OID, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12029_CONTROL_WITHOUT_OID ) );
         }
 
@@ -863,7 +866,7 @@ public class LdifReader implements Itera
         if ( pos == initPos )
         {
             // Not a valid OID !
-            LOG.error( I18n.err( I18n.ERR_12029_CONTROL_WITHOUT_OID ) );
+            LOG.error( I18n.err( I18n.ERR_12029_CONTROL_WITHOUT_OID, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12029_CONTROL_WITHOUT_OID ) );
         }
 
@@ -872,7 +875,7 @@ public class LdifReader implements Itera
 
         if ( !Oid.isOid( oidString ) )
         {
-            String message = I18n.err( I18n.ERR_12031_INVALID_OID, oidString );
+            String message = I18n.err( I18n.ERR_12031_INVALID_OID, oidString, lineNumber );
             LOG.error( message );
             throw new LdapLdifException( message );
         }
@@ -912,7 +915,7 @@ public class LdifReader implements Itera
         {
             // If we have a criticality, it should be either "true" or "false",
             // nothing else
-            LOG.error( I18n.err( I18n.ERR_12033_INVALID_CRITICALITY ) );
+            LOG.error( I18n.err( I18n.ERR_12033_INVALID_CRITICALITY, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12033_INVALID_CRITICALITY ) );
         }
 
@@ -1015,7 +1018,7 @@ public class LdifReader implements Itera
         // We should *not* have a Dn twice
         if ( attributeType.equals( "dn" ) )
         {
-            LOG.error( I18n.err( I18n.ERR_12002_ENTRY_WITH_TWO_DNS ) );
+            LOG.error( I18n.err( I18n.ERR_12002_ENTRY_WITH_TWO_DNS, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12003_LDIF_ENTRY_WITH_TWO_DNS ) );
         }
 
@@ -1058,13 +1061,13 @@ public class LdifReader implements Itera
             }
             else
             {
-                LOG.error( I18n.err( I18n.ERR_12035_BAD_MODRDN_OPERATION ) );
+                LOG.error( I18n.err( I18n.ERR_12035_BAD_MODRDN_OPERATION, lineNumber ) );
                 throw new LdapLdifException( I18n.err( I18n.ERR_12035_BAD_MODRDN_OPERATION ) );
             }
         }
         else
         {
-            LOG.error( I18n.err( I18n.ERR_12035_BAD_MODRDN_OPERATION ) );
+            LOG.error( I18n.err( I18n.ERR_12035_BAD_MODRDN_OPERATION, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12035_BAD_MODRDN_OPERATION ) );
         }
 
@@ -1081,13 +1084,13 @@ public class LdifReader implements Itera
             }
             else
             {
-                LOG.error( I18n.err( I18n.ERR_12038_NO_DELETEOLDRDN ) );
+                LOG.error( I18n.err( I18n.ERR_12038_NO_DELETEOLDRDN, lineNumber ) );
                 throw new LdapLdifException( I18n.err( I18n.ERR_12038_NO_DELETEOLDRDN ) );
             }
         }
         else
         {
-            LOG.error( I18n.err( I18n.ERR_12038_NO_DELETEOLDRDN ) );
+            LOG.error( I18n.err( I18n.ERR_12038_NO_DELETEOLDRDN, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12038_NO_DELETEOLDRDN ) );
         }
     }
@@ -1130,7 +1133,7 @@ public class LdifReader implements Itera
             {
                 if ( ( state != ATTRVAL_SPEC_OR_SEP ) && ( state != ATTRVAL_SPEC ) )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12040_BAD_MODIFY_SEPARATOR ) );
+                    LOG.error( I18n.err( I18n.ERR_12040_BAD_MODIFY_SEPARATOR, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12040_BAD_MODIFY_SEPARATOR ) );
                 }
                 else
@@ -1154,7 +1157,7 @@ public class LdifReader implements Itera
             {
                 if ( ( state != MOD_SPEC ) && ( state != ATTRVAL_SPEC ) )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
+                    LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
                 }
 
@@ -1168,7 +1171,7 @@ public class LdifReader implements Itera
             {
                 if ( ( state != MOD_SPEC ) && ( state != ATTRVAL_SPEC ) )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
+                    LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
                 }
 
@@ -1183,7 +1186,7 @@ public class LdifReader implements Itera
             {
                 if ( ( state != MOD_SPEC ) && ( state != ATTRVAL_SPEC ) )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
+                    LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
                 }
 
@@ -1197,7 +1200,7 @@ public class LdifReader implements Itera
             {
                 if ( ( state != ATTRVAL_SPEC ) && ( state != ATTRVAL_SPEC_OR_SEP ) )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12040_BAD_MODIFY_SEPARATOR ) );
+                    LOG.error( I18n.err( I18n.ERR_12040_BAD_MODIFY_SEPARATOR, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12040_BAD_MODIFY_SEPARATOR ) );
                 }
 
@@ -1208,14 +1211,14 @@ public class LdifReader implements Itera
 
                 if ( !attributeType.equalsIgnoreCase( modified ) )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12044 ) );
+                    LOG.error( I18n.err( I18n.ERR_12044, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12045 ) );
                 }
 
                 // We should *not* have a Dn twice
                 if ( attributeType.equalsIgnoreCase( "dn" ) )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12002_ENTRY_WITH_TWO_DNS ) );
+                    LOG.error( I18n.err( I18n.ERR_12002_ENTRY_WITH_TWO_DNS, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12003_LDIF_ENTRY_WITH_TWO_DNS ) );
                 }
 
@@ -1245,7 +1248,7 @@ public class LdifReader implements Itera
 
         if ( state != MOD_SPEC )
         {
-            LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
+            LOG.error( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12042_BAD_MODIFY_SEPARATOR_2 ) );
         }
     }
@@ -1340,7 +1343,7 @@ public class LdifReader implements Itera
                     {
                         if ( operation == ChangeType.ModDn )
                         {
-                            LOG.error( I18n.err( I18n.ERR_12046 ) );
+                            LOG.error( I18n.err( I18n.ERR_12046, lineNumber ) );
                             throw new LdapLdifException( I18n.err( I18n.ERR_12047 ) );
                         }
                     }
@@ -1350,7 +1353,7 @@ public class LdifReader implements Itera
 
             default:
                 // This is an error
-                LOG.error( I18n.err( I18n.ERR_12048 ) );
+                LOG.error( I18n.err( I18n.ERR_12048, lineNumber ) );
                 throw new LdapLdifException( I18n.err( I18n.ERR_12049 ) );
         }
     }
@@ -1432,7 +1435,7 @@ public class LdifReader implements Itera
             {
                 if ( containsEntries )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12004_CHANGE_NOT_ALLOWED ) );
+                    LOG.error( I18n.err( I18n.ERR_12004_CHANGE_NOT_ALLOWED, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12005_NO_CHANGE ) );
                 }
 
@@ -1440,7 +1443,7 @@ public class LdifReader implements Itera
 
                 if ( controlSeen )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12050 ) );
+                    LOG.error( I18n.err( I18n.ERR_12050, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12051 ) );
                 }
 
@@ -1452,7 +1455,7 @@ public class LdifReader implements Itera
             {
                 if ( containsEntries )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12004_CHANGE_NOT_ALLOWED ) );
+                    LOG.error( I18n.err( I18n.ERR_12004_CHANGE_NOT_ALLOWED, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12005_NO_CHANGE ) );
                 }
 
@@ -1460,7 +1463,7 @@ public class LdifReader implements Itera
 
                 if ( changeTypeSeen )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12052 ) );
+                    LOG.error( I18n.err( I18n.ERR_12052, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12053 ) );
                 }
 
@@ -1478,7 +1481,7 @@ public class LdifReader implements Itera
             {
                 if ( containsChanges )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12004_CHANGE_NOT_ALLOWED ) );
+                    LOG.error( I18n.err( I18n.ERR_12004_CHANGE_NOT_ALLOWED, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12005_NO_CHANGE ) );
                 }
 
@@ -1486,7 +1489,7 @@ public class LdifReader implements Itera
 
                 if ( controlSeen || changeTypeSeen )
                 {
-                    LOG.error( I18n.err( I18n.ERR_12054 ) );
+                    LOG.error( I18n.err( I18n.ERR_12054, lineNumber ) );
                     throw new LdapLdifException( I18n.err( I18n.ERR_12055 ) );
                 }
 
@@ -1496,7 +1499,7 @@ public class LdifReader implements Itera
             else
             {
                 // Invalid attribute Value
-                LOG.error( I18n.err( I18n.ERR_12056 ) );
+                LOG.error( I18n.err( I18n.ERR_12056, lineNumber ) );
                 throw new LdapLdifException( I18n.err( I18n.ERR_12057_BAD_ATTRIBUTE ) );
             }
         }
@@ -1512,7 +1515,7 @@ public class LdifReader implements Itera
         }
         else
         {
-            LOG.error( I18n.err( I18n.ERR_12058_UNKNOWN_ENTRY_TYPE ) );
+            LOG.error( I18n.err( I18n.ERR_12058_UNKNOWN_ENTRY_TYPE, lineNumber ) );
             throw new LdapLdifException( I18n.err( I18n.ERR_12059_UNKNOWN_ENTRY ) );
         }
 
@@ -1557,7 +1560,7 @@ public class LdifReader implements Itera
             // We should not have any other chars after the number
             if ( position != document.length )
             {
-                LOG.error( I18n.err( I18n.ERR_12060_VERSION_NOT_A_NUMBER ) );
+                LOG.error( I18n.err( I18n.ERR_12060_VERSION_NOT_A_NUMBER, lineNumber ) );
                 throw new LdapLdifException( I18n.err( I18n.ERR_12061_LDIF_PARSING_ERROR ) );
             }
 
@@ -1567,7 +1570,7 @@ public class LdifReader implements Itera
             }
             catch ( NumberFormatException nfe )
             {
-                LOG.error( I18n.err( I18n.ERR_12060_VERSION_NOT_A_NUMBER ) );
+                LOG.error( I18n.err( I18n.ERR_12060_VERSION_NOT_A_NUMBER, lineNumber ) );
                 throw new LdapLdifException( I18n.err( I18n.ERR_12061_LDIF_PARSING_ERROR ), nfe );
             }
 
@@ -1665,7 +1668,7 @@ public class LdifReader implements Itera
                         }
                         else if ( sb.length() == 0 )
                         {
-                            LOG.error( I18n.err( I18n.ERR_12062_EMPTY_CONTINUATION_LINE ) );
+                            LOG.error( I18n.err( I18n.ERR_12062_EMPTY_CONTINUATION_LINE, lineNumber ) );
                             throw new LdapLdifException( I18n.err( I18n.ERR_12061_LDIF_PARSING_ERROR ) );
                         }
                         else
@@ -2075,7 +2078,8 @@ public class LdifReader implements Itera
             return new LdifEntry();
         }
     }
-    
+
+
     /**
      * @return true if the DN validation is turned on
      */