# Failed to execute bulk item?

**URL:** <https://discuss.elastic.co/t/failed-to-execute-bulk-item/7475>\
**Category:** Elasticsearch\
**Created:** [April 26, 2012, 1:31pm UTC](https://discuss.elastic.co/t/failed-to-execute-bulk-item/7475 "2012-04-26T13:31:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sam\_4](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@Sam\_4](https://discuss.elastic.co/u/Sam_4)\
**Post date:** [April 26, 2012, 1:31pm UTC](https://discuss.elastic.co/t/failed-to-execute-bulk-item/7475/1 "2012-04-26T13:31:12Z")

</div>

Hi

when i am building index using rabbitmq river, multiple threads are  
publishing message into same queue with same index but different index  
type,i am getting following exception :

[2012-04-26 18:31:57,636][DEBUG][action.bulk] [Coral]  
[idx\_masterdatabase][2]: Failed to execute bulk item (index) [index  
{[idx\_masterdatabase][type\_test2][1], source[{ "type\_test2" :{"id":  
1,"Description":"A computer is a programmable machine designed to  
sequentially and automatically carry out a sequence of arithmetic or  
logical operations"}}]}]  
java.lang.NullPointerException  
at  
org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:  
542)  
at  
org.apache.lucene.analysis.shingle.ShingleFilter.getNextToken(ShingleFilter.java:  
356)  
at  
org.apache.lucene.analysis.shingle.ShingleFilter.shiftInputWindow(ShingleFilter.java:  
415)  
at  
org.apache.lucene.analysis.shingle.ShingleFilter.incrementToken(ShingleFilter.java:  
284)  
at  
org.apache.lucene.analysis.snowball.SnowballFilter.incrementToken(SnowballFilter.java:  
76)  
at  
org.apache.lucene.analysis.fr.ElisionFilter.incrementToken(ElisionFilter.java:  
121)  
at  
org.elasticsearch.index.analysis.phonetic.PhoneticFilter.incrementToken(PhoneticFilter.java:  
61)  
at  
org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:  
132)  
at  
org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:  
248)  
at  
org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:  
701)  
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:  
2042)  
at  
org.elasticsearch.index.engine.robin.RobinEngine.innerIndex(RobinEngine.java:  
459)  
at  
org.elasticsearch.index.engine.robin.RobinEngine.index(RobinEngine.java:  
374)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.index(InternalIndexShard.java:  
292)  
at  
org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:  
131)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction  
$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:  
418)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction  
$AsyncShardOperationAction.access  
$100(TransportShardReplicationOperationAction.java:233)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction  
$AsyncShardOperationAction  
$1.run(TransportShardReplicationOperationAction.java:331)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.runTask(ThreadPoolExecutor.java:886)  
at java.util.concurrent.ThreadPoolExecutor  
$Worker.run(ThreadPoolExecutor.java:908)  
at java.lang.Thread.run(Thread.java:662)

This Exception is not thrown by piece of code only prints in elastic  
server log, thus i am not able to catch it.Is there any way to handle  
this exception in client program.?  
And what could be possible reason for the above exception?

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 27, 2012, 11:15am UTC](https://discuss.elastic.co/t/failed-to-execute-bulk-item/7475/2 "2012-04-27T11:15:42Z")

</div>

Not sure why this failure happens..., can you try and recreate it in a  
standalone index operation? ([Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help)).

On Thu, Apr 26, 2012 at 4:31 PM, sam [mishra.sameek@gmail.com](mailto:mishra.sameek@gmail.com) wrote:

> Hi
> 
> when i am building index using rabbitmq river, multiple threads are  
> publishing message into same queue with same index but different index  
> type,i am getting following exception :
> 
> [2012-04-26 18:31:57,636][DEBUG][action.bulk] [Coral]  
> [idx\_masterdatabase][2]: Failed to execute bulk item (index) [index  
> {[idx\_masterdatabase][type\_test2][1], source[{ "type\_test2" :{"id":  
> 1,"Description":"A computer is a programmable machine designed to  
> sequentially and automatically carry out a sequence of arithmetic or  
> logical operations"}}]}]  
> java.lang.NullPointerException  
> at
> 
> org.apache.lucene.util.AttributeSource.cloneAttributes(AttributeSource.java:  
> 542)  
> at
> 
> org.apache.lucene.analysis.shingle.ShingleFilter.getNextToken(ShingleFilter.java:  
> 356)  
> at
> 
> org.apache.lucene.analysis.shingle.ShingleFilter.shiftInputWindow(ShingleFilter.java:  
> 415)  
> at
> 
> org.apache.lucene.analysis.shingle.ShingleFilter.incrementToken(ShingleFilter.java:  
> 284)  
> at
> 
> org.apache.lucene.analysis.snowball.SnowballFilter.incrementToken(SnowballFilter.java:  
> 76)  
> at
> 
> org.apache.lucene.analysis.fr.ElisionFilter.incrementToken(ElisionFilter.java:  
> 121)  
> at
> 
> org.elasticsearch.index.analysis.phonetic.PhoneticFilter.incrementToken(PhoneticFilter.java:  
> 61)  
> at
> 
> org.apache.lucene.index.DocInverterPerField.processFields(DocInverterPerField.java:  
> 132)  
> at
> 
> org.apache.lucene.index.DocFieldProcessorPerThread.processDocument(DocFieldProcessorPerThread.java:  
> 248)  
> at
> 
> org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:  
> 701)  
> at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:  
> 2042)  
> at
> 
> org.elasticsearch.index.engine.robin.RobinEngine.innerIndex(RobinEngine.java:  
> 459)  
> at  
> org.elasticsearch.index.engine.robin.RobinEngine.index(RobinEngine.java:  
> 374)  
> at
> 
> org.elasticsearch.index.shard.service.InternalIndexShard.index(InternalIndexShard.java:  
> 292)  
> at
> 
> org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:  
> 131)  
> at
> 
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction
> 
> $AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:  
> 418)  
> at
> 
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction  
> $AsyncShardOperationAction.access  
> $100(TransportShardReplicationOperationAction.java:233)  
> at
> 
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction  
> $AsyncShardOperationAction  
> $1.run(TransportShardReplicationOperationAction.java:331)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.runTask(ThreadPoolExecutor.java:886)  
> at java.util.concurrent.ThreadPoolExecutor  
> $Worker.run(ThreadPoolExecutor.java:908)  
> at java.lang.Thread.run(Thread.java:662)
> 
> This Exception is not thrown by piece of code only prints in elastic  
> server log, thus i am not able to catch it.Is there any way to handle  
> this exception in client program.?  
> And what could be possible reason for the above exception?

---

<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, 3:30am UTC](https://discuss.elastic.co/t/failed-to-execute-bulk-item/7475/3 "2017-07-06T03:30:54Z")

</div>


