# Can't get text on a END\_OBJECT

**URL:** https://discuss.elastic.co/t/cant-get-text-on-a-end-object/63039
**Category:** Elasticsearch
**Created:** [October 14, 2016, 8:49am UTC](https://discuss.elastic.co/t/cant-get-text-on-a-end-object/63039 "2016-10-14T08:49:40Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![AlexDM](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@AlexDM](https://discuss.elastic.co/u/AlexDM)
#### Post date: [October 14, 2016, 8:49am UTC](https://discuss.elastic.co/t/cant-get-text-on-a-end-object/63039/1 "2016-10-14T08:49:40Z")

</div>

MapperParsingException[failed to parse [Entry.Component.raw]]; nested: IllegalStateException[Can't get text on a END\_OBJECT at 1:729];

XML contains sometimes null value field:

... \<"Component\>\<"/Component\> ...

The same problems:

> [@Xml filter plugin - creating nested field out of null object: Can't get text on a END\_OBJECT](https://discuss.elastic.co/t/xml-filter-plugin-creating-nested-field-out-of-null-object-cant-get-text-on-a-end-object/56928/10):
>
> Ok, so looks like I can remove completely and it resolves the issue. I guess im still curious how/why it gets pulled in as a nested field instead of empty string. Finally, my last question is how would i remove that field ONLY when it is empty? Since it isn't an empty string field and instead an empty nested field the following hasn't worked: this one fails to fulfill condition: if "" in [entry][ApplId]{ mutate { remove\_field =\> ["[entry][ApplId]" ] } } this one actuates EVERY time: …

> [@Null value causing errors?](https://discuss.elastic.co/t/null-value-causing-errors/56675):
>
> im receiving this error: "reason"=\>"failed to parse [entry.AppId.raw]", "caused\_by"=\>{"type"=\>"illegal\_state\_exception", "reason"=\>"Can't get text on a END\_OBJECT at 1:2285"} i see this value: "AppId"=\>[{}] Here is the mapping statement for said field which is parsed by xml filter and should either be a string whether null or not. "AppId": { "norms": { "enabled": false }, …

But I still didn't find solution.  
if !([entry][Component] =~ /.+/) {  
mutate {  
remove\_field =\> ["[entry][Component]" ]  
}  
}  
doen't work, It remove all fields null and not null.

---

<div class="post-metadata">

### Author: ![AlexDM](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@AlexDM](https://discuss.elastic.co/u/AlexDM)
#### Post date: [October 14, 2016, 8:57am UTC](https://discuss.elastic.co/t/cant-get-text-on-a-end-object/63039/2 "2016-10-14T08:57:04Z")

</div>

Another field in my XML file  
\<"Topic"\> \<"/Topic"\>  
are always null and I don't see any problem with sening this field to Elastic

---

<div class="post-metadata">

### Author: ![AlexDM](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@AlexDM](https://discuss.elastic.co/u/AlexDM)
#### Post date: [October 14, 2016, 10:46am UTC](https://discuss.elastic.co/t/cant-get-text-on-a-end-object/63039/3 "2016-10-14T10:46:38Z")

</div>

\<"Topic"\> \<"/Topic"\> is not indexed

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [October 14, 2016, 2:23pm UTC](https://discuss.elastic.co/t/cant-get-text-on-a-end-object/63039/4 "2016-10-14T14:23:40Z")

</div>

Can you give more context? Which API is raising this issue, is it the index API?

---

<div class="post-metadata">

### Author: ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)
#### Post date: [October 14, 2016, 2:23pm UTC](https://discuss.elastic.co/t/cant-get-text-on-a-end-object/63039/5 "2016-10-14T14:23:58Z")

</div>

If yes, then what do your documents look like?

---

<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, 10:12pm UTC](https://discuss.elastic.co/t/cant-get-text-on-a-end-object/63039/6 "2017-07-05T22:12:17Z")

</div>


