# Bulk API Indexing Status 500 Error NullPointerException\[null\]

**URL:** <https://discuss.elastic.co/t/bulk-api-indexing-status-500-error-nullpointerexception-null/21331>\
**Category:** Elasticsearch\
**Created:** [December 19, 2014, 1:28pm UTC](https://discuss.elastic.co/t/bulk-api-indexing-status-500-error-nullpointerexception-null/21331 "2014-12-19T13:28:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drjz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drjz/32/972_2.png) [@drjz](https://discuss.elastic.co/u/drjz)\
**Post date:** [December 19, 2014, 1:28pm UTC](https://discuss.elastic.co/t/bulk-api-indexing-status-500-error-nullpointerexception-null/21331/1 "2014-12-19T13:28:24Z")

</div>

Dear all,

I am encountering a weird issue. When I use the Bulk API (REST) to index  
documents, I am getting for the same documents each time the following  
error returned:

"status":500,"error":"NullPointerException[null]"

However, when I re-index the rejected documents, it will index them the  
second time.

Is there a work-around for this? Is it a connectivity issue?

Help greatly appreciated!

Thanks!  
/JZ

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![jprante](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jprante/32/44941_2.png) [@jprante](https://discuss.elastic.co/u/jprante)\
**Post date:** [December 19, 2014, 1:48pm UTC](https://discuss.elastic.co/t/bulk-api-indexing-status-500-error-nullpointerexception-null/21331/2 "2014-12-19T13:48:57Z")

</div>

Can you show the data you send in the bulk request, and your code?

Most probably you send null values for index or type.

Jörg

On Fri, Dec 19, 2014 at 2:28 PM, drjz [juntezhang@gmail.com](mailto:juntezhang@gmail.com) wrote:

> Dear all,
> 
> I am encountering a weird issue. When I use the Bulk API (REST) to index  
> documents, I am getting for the same documents each time the following  
> error returned:
> 
> "status":500,"error":"NullPointerException[null]"
> 
> However, when I re-index the rejected documents, it will index them the  
> second time.
> 
> Is there a work-around for this? Is it a connectivity issue?
> 
> Help greatly appreciated!
> 
> Thanks!  
> /JZ
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHe7hzKCU46wxy7V25Ygh-1bnO-wcUbrqpOH9n2doAh5Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAKdsXoHe7hzKCU46wxy7V25Ygh-1bnO-wcUbrqpOH9n2doAh5Q%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![drjz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/drjz/32/972_2.png) [@drjz](https://discuss.elastic.co/u/drjz)\
**Post date:** [December 19, 2014, 2:26pm UTC](https://discuss.elastic.co/t/bulk-api-indexing-status-500-error-nullpointerexception-null/21331/3 "2014-12-19T14:26:25Z")

</div>

I solved this by adding this setting in the index configuration.

"index" : {  
"refresh\_interval" : "-1"  
}

So it was a connectivity issue after all. 🙂

/JZ

On Friday, December 19, 2014 2:49:05 PM UTC+1, Jörg Prante wrote:

> Can you show the data you send in the bulk request, and your code?
> 
> Most probably you send null values for index or type.
> 
> Jörg
> 
> On Fri, Dec 19, 2014 at 2:28 PM, drjz \<[junte...@gmail.com](mailto:junte...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Dear all,
> > 
> > I am encountering a weird issue. When I use the Bulk API (REST) to index  
> > documents, I am getting for the same documents each time the following  
> > error returned:
> > 
> > "status":500,"error":"NullPointerException[null]"
> > 
> > However, when I re-index the rejected documents, it will index them the  
> > second time.
> > 
> > Is there a work-around for this? Is it a connectivity issue?
> > 
> > Help greatly appreciated!
> > 
> > Thanks!  
> > /JZ
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/e11ea64e-4e01-43ea-973d-8c58e7020e5c%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/fd53d6f2-4531-4d19-922a-5292bf2ef2ec%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/fd53d6f2-4531-4d19-922a-5292bf2ef2ec%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:42am UTC](https://discuss.elastic.co/t/bulk-api-indexing-status-500-error-nullpointerexception-null/21331/4 "2017-07-06T00:42:41Z")

</div>


