# NPE in 0.90.6 when asking for pretty formatted output

**URL:** <https://discuss.elastic.co/t/npe-in-0-90-6-when-asking-for-pretty-formatted-output/14272>\
**Category:** Elasticsearch\
**Created:** [November 5, 2013, 5:18pm UTC](https://discuss.elastic.co/t/npe-in-0-90-6-when-asking-for-pretty-formatted-output/14272 "2013-11-05T17:18:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![thesuaves22](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@thesuaves22](https://discuss.elastic.co/u/thesuaves22)\
**Post date:** [November 5, 2013, 5:18pm UTC](https://discuss.elastic.co/t/npe-in-0-90-6-when-asking-for-pretty-formatted-output/14272/1 "2013-11-05T17:18:02Z")

</div>

Anyone else having a problem with queries in 0.90.6 that request pretty  
formatted output? These same queries worked in 0.90.5 just fine. When I  
specify the pretty=true query parameter, I'm getting this exception on the  
server:

org.elasticsearch.action.search.ReduceSearchPhaseException: Failed to  
execute phase [merge], [reduce]  
at  
org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.finishHim(TransportSearchDfsQueryThenFetchAction.java:281)  
at  
org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$6.onResult(TransportSearchDfsQueryThenFetchAction.java:255)  
at  
org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$6.onResult(TransportSearchDfsQueryThenFetchAction.java:249)  
at  
org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:407)  
at  
org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchDfsQueryThenFetchAction.java:249)  
at  
org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$5.run(TransportSearchDfsQueryThenFetchAction.java:233)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)  
at java.lang.Thread.run(Thread.java:695)  
Caused by: java.lang.NullPointerException  
at java.lang.System.arraycopy(Native Method)  
at  
org.elasticsearch.common.jackson.core.json.UTF8JsonGenerator.\_writeBytes(UTF8JsonGenerator.java:1125)  
at  
org.elasticsearch.common.jackson.core.json.UTF8JsonGenerator.writeRaw(UTF8JsonGenerator.java:603)  
at  
org.elasticsearch.common.xcontent.json.JsonXContentGenerator.close(JsonXContentGenerator.java:332)  
at  
org.elasticsearch.common.xcontent.XContentBuilder.close(XContentBuilder.java:1051)  
at  
org.elasticsearch.common.xcontent.XContentBuilder.bytes(XContentBuilder.java:1067)  
at  
org.elasticsearch.http.netty.NettyHttpChannel.sendResponse(NettyHttpChannel.java:111)  
...

Thanks,  
Sean

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Hendrik](https://avatars.discourse-cdn.com/v4/letter/h/839c29/32.png) [@Hendrik](https://discuss.elastic.co/u/Hendrik)\
**Post date:** [November 5, 2013, 7:52pm UTC](https://discuss.elastic.co/t/npe-in-0-90-6-when-asking-for-pretty-formatted-output/14272/2 "2013-11-05T19:52:36Z")

</div>

cannot reproduce this yet, can you please post your query?

this works fine for me: [http://localhost:9200/\_search?pretty=true](http://localhost:9200/_search?pretty=true)

Am Dienstag, 5. November 2013 18:18:02 UTC+1 schrieb [thesu...@gmail.com](mailto:thesu...@gmail.com):

> Anyone else having a problem with queries in 0.90.6 that request pretty  
> formatted output? These same queries worked in 0.90.5 just fine. When I  
> specify the pretty=true query parameter, I'm getting this exception on the  
> server:
> 
> org.elasticsearch.action.search.ReduceSearchPhaseException: Failed to  
> execute phase [merge], [reduce]  
> at  
> org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.finishHim(TransportSearchDfsQueryThenFetchAction.java:281)  
> at  
> org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$6.onResult(TransportSearchDfsQueryThenFetchAction.java:255)  
> at  
> org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$6.onResult(TransportSearchDfsQueryThenFetchAction.java:249)  
> at  
> org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:407)  
> at  
> org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchDfsQueryThenFetchAction.java:249)  
> at  
> org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$5.run(TransportSearchDfsQueryThenFetchAction.java:233)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)  
> at java.lang.Thread.run(Thread.java:695)  
> Caused by: java.lang.NullPointerException  
> at java.lang.System.arraycopy(Native Method)  
> at  
> org.elasticsearch.common.jackson.core.json.UTF8JsonGenerator.\_writeBytes(UTF8JsonGenerator.java:1125)  
> at  
> org.elasticsearch.common.jackson.core.json.UTF8JsonGenerator.writeRaw(UTF8JsonGenerator.java:603)  
> at  
> org.elasticsearch.common.xcontent.json.JsonXContentGenerator.close(JsonXContentGenerator.java:332)  
> at  
> org.elasticsearch.common.xcontent.XContentBuilder.close(XContentBuilder.java:1051)  
> at  
> org.elasticsearch.common.xcontent.XContentBuilder.bytes(XContentBuilder.java:1067)  
> at  
> org.elasticsearch.http.netty.NettyHttpChannel.sendResponse(NettyHttpChannel.java:111)  
> ...
> 
> Thanks,  
> Sean

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![thesuaves22](https://avatars.discourse-cdn.com/v4/letter/t/c77e96/32.png) [@thesuaves22](https://discuss.elastic.co/u/thesuaves22)\
**Post date:** [November 5, 2013, 8:59pm UTC](https://discuss.elastic.co/t/npe-in-0-90-6-when-asking-for-pretty-formatted-output/14272/3 "2013-11-05T20:59:36Z")

</div>

Created an issue w/ gist:  
[NPE when closing XContentBuilder and using 'pretty' query parameter · Issue #4100 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/4100)

On Tuesday, November 5, 2013 2:52:36 PM UTC-5, Hendrik wrote:

> cannot reproduce this yet, can you please post your query?
> 
> this works fine for me: [http://localhost:9200/\_search?pretty=true](http://localhost:9200/_search?pretty=true)
> 
> Am Dienstag, 5. November 2013 18:18:02 UTC+1 schrieb [thesu...@gmail.com](mailto:thesu...@gmail.com):
> 
> > Anyone else having a problem with queries in 0.90.6 that request pretty  
> > formatted output? These same queries worked in 0.90.5 just fine. When I  
> > specify the pretty=true query parameter, I'm getting this exception on the  
> > server:
> > 
> > org.elasticsearch.action.search.ReduceSearchPhaseException: Failed to  
> > execute phase [merge], [reduce]  
> > at  
> > org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.finishHim(TransportSearchDfsQueryThenFetchAction.java:281)  
> > at  
> > org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$6.onResult(TransportSearchDfsQueryThenFetchAction.java:255)  
> > at  
> > org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$6.onResult(TransportSearchDfsQueryThenFetchAction.java:249)  
> > at  
> > org.elasticsearch.search.action.SearchServiceTransportAction.sendExecuteFetch(SearchServiceTransportAction.java:407)  
> > at  
> > org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction.executeFetch(TransportSearchDfsQueryThenFetchAction.java:249)  
> > at  
> > org.elasticsearch.action.search.type.TransportSearchDfsQueryThenFetchAction$AsyncAction$5.run(TransportSearchDfsQueryThenFetchAction.java:233)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)  
> > at  
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)  
> > at java.lang.Thread.run(Thread.java:695)  
> > Caused by: java.lang.NullPointerException  
> > at java.lang.System.arraycopy(Native Method)  
> > at  
> > org.elasticsearch.common.jackson.core.json.UTF8JsonGenerator.\_writeBytes(UTF8JsonGenerator.java:1125)  
> > at  
> > org.elasticsearch.common.jackson.core.json.UTF8JsonGenerator.writeRaw(UTF8JsonGenerator.java:603)  
> > at  
> > org.elasticsearch.common.xcontent.json.JsonXContentGenerator.close(JsonXContentGenerator.java:332)  
> > at  
> > org.elasticsearch.common.xcontent.XContentBuilder.close(XContentBuilder.java:1051)  
> > at  
> > org.elasticsearch.common.xcontent.XContentBuilder.bytes(XContentBuilder.java:1067)  
> > at  
> > org.elasticsearch.http.netty.NettyHttpChannel.sendResponse(NettyHttpChannel.java:111)  
> > ...
> > 
> > Thanks,  
> > Sean

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:08am UTC](https://discuss.elastic.co/t/npe-in-0-90-6-when-asking-for-pretty-formatted-output/14272/4 "2017-07-06T02:08:40Z")

</div>

Closed on July 6, 2017, 2:08am UTC


