# Dynamic\_template causes MapperParsingException

**URL:** <https://discuss.elastic.co/t/dynamic-template-causes-mapperparsingexception/25125>\
**Category:** Elasticsearch\
**Created:** [July 8, 2015, 7:53am UTC](https://discuss.elastic.co/t/dynamic-template-causes-mapperparsingexception/25125 "2015-07-08T07:53:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eran\_Eidinger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eran_eidinger/32/44831_2.png) [@Eran\_Eidinger](https://discuss.elastic.co/u/Eran_Eidinger)\
**Post date:** [July 8, 2015, 7:53am UTC](https://discuss.elastic.co/t/dynamic-template-causes-mapperparsingexception/25125/1 "2015-07-08T07:53:11Z")

</div>

I try to create a simple template, including some dynamic template, and I can't seem to index documents.

I get an MapperParsingException error:

It works fine if I remove the dynamic\_templates part of the JSON.

What am I doing wrong?

> [Here is a reproduction of the code](https://gist.github.com/anonymous/0310ac13b54e7f96ace3) in python

**This is the printout of the program:**

200 {"acknowledged":true}  
400 {"error":"MapperParsingException[mapping [_default_]]; nested: ClassCastException[java.util.LinkedHashMap cannot be cast to java.util.List]; ","status":400}

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 12:02am UTC](https://discuss.elastic.co/t/dynamic-template-causes-mapperparsingexception/25125/2 "2017-07-06T00:02:56Z")

</div>


