# Exception while inserting the document

**URL:** <https://discuss.elastic.co/t/exception-while-inserting-the-document/24905>\
**Category:** Elasticsearch\
**Created:** [July 5, 2015, 2:21am UTC](https://discuss.elastic.co/t/exception-while-inserting-the-document/24905 "2015-07-05T02:21:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [July 5, 2015, 2:21am UTC](https://discuss.elastic.co/t/exception-while-inserting-the-document/24905/1 "2015-07-05T02:21:44Z")

</div>

Hi All,  
I am using ES 1.4.4. and Java 8. Both running on the same machine.  
Below is the exception when I am trying to insert recored using Java Client.

04-Jul-2015 16:07:40,380 ERROR [com.x.x.x] (pool-14-thread-12) Failed to save event: org.elasticsearch.ElasticsearchIllegalStateException: map is already mutating, can't have another mutator on it  
at org.elasticsearch.common.collect.UpdateInPlaceMap.mutator(UpdateInPlaceMap.java:104) [elasticsearch-1.4.4.jar:]  
at org.elasticsearch.index.mapper.FieldMappersLookup.addNewMappers(FieldMappersLookup.java:57) [elasticsearch-1.4.4.jar:]  
at org.elasticsearch.index.mapper.MapperService.addFieldMappers(MapperService.java:397) [elasticsearch-1.4.4.jar:]  
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:358) [elasticsearch-1.4.4.jar:]  
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:317) [elasticsearch-1.4.4.jar:]  
at org.elasticsearch.index.mapper.MapperService.documentMapperWithAutoCreate(MapperService.java:477) [elasticsearch-1.4.4.jar:]  
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:391) [elasticsearch-1.4.4.jar:]  
at org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:198) [elasticsearch-1.4.4.jar:]  
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.j  
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419) [e  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0\_25]  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0\_25]  
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0\_25]

Please help me out , as am not able to figure out what exactly is happening.

Thanks

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 5, 2015, 2:53am UTC](https://discuss.elastic.co/t/exception-while-inserting-the-document/24905/2 "2015-07-05T02:53:26Z")

</div>

I'm unsure but it looks like a bug.  
Any chance you can reproduce it with a CURL script?

But first, please update to 1.6 and see if this has been fixed already.

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [July 5, 2015, 7:42am UTC](https://discuss.elastic.co/t/exception-while-inserting-the-document/24905/3 "2015-07-05T07:42:24Z")

</div>

Thank you for quick reply David. This is the first time I am seeing this exception and this is in production and I was not able to reproduce in dev environment. As you suggested I will try to update my ES to 1.6.

---

<div class="post-metadata">

**Author:** ![Pradeep\_Gowda](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@Pradeep\_Gowda](https://discuss.elastic.co/u/Pradeep_Gowda)\
**Post date:** [February 21, 2016, 3:10am UTC](https://discuss.elastic.co/t/exception-while-inserting-the-document/24905/4 "2016-02-21T03:10:52Z")

</div>

Still facing this issue. Is this a bug?

---

<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 5, 2017, 11:14pm UTC](https://discuss.elastic.co/t/exception-while-inserting-the-document/24905/5 "2017-07-05T23:14:41Z")

</div>


