# Getting document by id error

**URL:** <https://discuss.elastic.co/t/getting-document-by-id-error/7914>\
**Category:** Elasticsearch\
**Created:** [May 30, 2012, 3:13pm UTC](https://discuss.elastic.co/t/getting-document-by-id-error/7914 "2012-05-30T15:13:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [May 30, 2012, 3:13pm UTC](https://discuss.elastic.co/t/getting-document-by-id-error/7914/1 "2012-05-30T15:13:54Z")

</div>

Hi,

What this response means:  
{  
"error":  
"ElasticSearchParseException[Failed to derive xcontent from (offset=0,  
length=0): []]"  
,  
"status":400  
}

while getting a document by ID from Elastic search ?  
I get this error when getting the document after other ES query calls. I  
use HTTP keep-alive for ES requests.

I am pretty sure that I did something wrong at my client implementation end  
but I have to figure out what this error means to find the problem 🙂

Thanks for any help.  
Best regards.

---

<div class="post-metadata">

**Author:** ![Marcin\_Dojwa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcin_dojwa/32/2307_2.png) [@Marcin\_Dojwa](https://discuss.elastic.co/u/Marcin_Dojwa)\
**Post date:** [May 31, 2012, 6:57am UTC](https://discuss.elastic.co/t/getting-document-by-id-error/7914/2 "2012-05-31T06:57:52Z")

</div>

Hi,

I found the problem, I was sending GET request as POST by mistake.

Best regards.

2012/5/30 Marcin Dojwa [m.dojwa@livechatinc.com](mailto:m.dojwa@livechatinc.com)

> Hi,
> 
> What this response means:  
> {  
> "error":  
> "ElasticSearchParseException[Failed to derive xcontent from (offset=0, length=0):]"  
> ,  
> "status":400  
> }
> 
> while getting a document by ID from Elastic search ?  
> I get this error when getting the document after other ES query calls. I  
> use HTTP keep-alive for ES requests.
> 
> I am pretty sure that I did something wrong at my client implementation  
> end but I have to figure out what this error means to find the problem 🙂
> 
> Thanks for any help.  
> Best regards.

---

<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:26am UTC](https://discuss.elastic.co/t/getting-document-by-id-error/7914/3 "2017-07-06T03:26:11Z")

</div>


