java.lang.IllegalArgumentException

Unable to identify index name. HashMap is not a Document. Make sure the document class is annotated with @Document(indexName="foo")

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web157

  • Stack trace

    • java.lang.IllegalArgumentException: Unable to identify index name. HashMap is not a Document. Make sure the document class is annotated with @Document(indexName="foo") at org.springframework.util.Assert.isTrue(Assert.java:65) at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.getPersistentEntityFor(ElasticsearchTemplate.java:624) at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.getPersistentEntityId(ElasticsearchTemplate.java:630) at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.prepareIndex(ElasticsearchTemplate.java:551) at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.bulkIndex(ElasticsearchTemplate.java:281)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    j.kienzlej.kienzle
    Once,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    49 more bugmates