I used POSTMAN to put mapping for index and i worked fine. Same mapping I used in Java API and is throwing MapperParsingException Error. Below is the code I am trying.
try{
CreateIndexResponse request=esClient.admin().indices().prepareCreate(serviceIndex)
.addMapping(serviceIndexType,serviceMap)
.get();
System.out.println(request);
}catch(Exception e){
logger.debug("Service Index Already there or Exception: "+e);
}