failed to map source {} to entity
<p>I am getting the following error on reading a document from elasticsearch using Spring Data Elasticsearch:</p>

<p>ERROR SearchController - Nested Exception : failed to map source { document data } to Book</p>

<pre><code>@Entity
@Table(name="books")
@Document(indexName="booksearchserver",type="book")
public class Book {
@org.springframework.data.annotation.Id
@Id
@Column(name="bookIsbn")
@Field(type = FieldType.Long, store = true)
private String bookIsbn;

@Column(name="bookTitle")
@Field(type = FieldType.String, store = true)
private String bookTitle;


@Column(name="authorId")
@Field(type = FieldType.Integer, store = true)
private int bookAuthorId;

@Column(name="bookLanguage")
@Field(type = FieldType.String, store = true)
private String bookLanguage;

@Column(name="bookPublisherId")
@Field(type = FieldType.Integer, store = true)
private short bookPublisherId;

@Column(name="bookReleaseDate")
@Field(type = FieldType.Date, store = true, format = DateFormat.custom, pattern="yyyy-MM-dd HH:mm:ss +SSSS")
private Date bookReleaseDate;

@JsonIgnore
@Column(name="bookNoOfChapters")
private short bookNoOfChapters;

@JsonIgnore
@Column(name="bookNoOfPages")
private short bookNoOfPages;

@JsonIgnore
@Column(name="bookNoOfWords")
private int bookWordCount;

@JsonIgnore
@Column(name="bookPrecededByIsbn" )
private long bookPrecededBy;

@JsonIgnore
@Column(name="bookFollowedByIsbn")
private long bookFollowedBy;

@Column(name="bookDescription")
@Field(type = FieldType.String, store = true )
private String bookDescription;

@JsonIgnore
@Column(name="bookCoverImage")
private String bookCover;
</code></pre>

<p>My Controller</p>

<pre><code>@RequestMapping(value="/isbnSearch" ,method = RequestMethod.POST)
public String isbnSearch(@RequestParam("bookIsbn") String bookIsbn, Model m) {
    try{
        logger.info("Search for Book by ISBN:" + bookIsbn);
        Book book = searchServices.getBookByIsbn(bookIsbn);
        int authorId = book.getBookAuthorId();
        logger.info("Author ID is " + authorId );
        m.addAttribute("Book", book);
        return "showBook";
    }catch(Exception e){
        logger.error("Nested Exception : "+e.getMessage());
        m.addAttribute("error", e.getMessage());
        return "showError";
    }
}
</code></pre>

<p>SearchServerImpl</p>

<pre><code>public Book getBookByIsbn(String isbn) {
//       try{
         Book book = esdao.findBybookIsbn(isbn);
         logger.info(""+ book.getBookTitle());
         return book;
//       }catch(ElasticsearchException ese){
//           logger.error("Nested Exception : " + ese.getMessage());
//           throw ese;
//       }catch(NullPointerException npe){
//           logger.error("Accessing NULL Class");
//           throw npe;
//       }
}
</code></pre>

<p>Esdao Repository </p>

<pre><code>package co.in.searchServer.repository;

import org.elasticsearch.index.query.QueryBuilder;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import co.in.searchServer.model.Book;

public interface ESDao extends ElasticsearchRepository&lt;Book,String&gt; {
    Iterable&lt;Book&gt; search(QueryBuilder arg0);
    Book findBybookIsbn(String isbn);
//  &lt;S extends Book&gt; S index(S arg0);
}
</code></pre>

<p>Please Provide me some suggestions and experiences on solving this</p>