This error comes whenever you use any other serializable datatype for mapper key other than LongWritable. This happens only when using multiple mappers. Please have a look below for your reference.
With the right datatypes, it should work fine. Make the changes shown in the screenshots above and execute the program.