# SearchPhaseExecutionException -ArrayIndexOutOfBoundsException\[110\]

**URL:** <https://discuss.elastic.co/t/searchphaseexecutionexception-arrayindexoutofboundsexception-110/3961>\
**Category:** Elasticsearch\
**Created:** [February 22, 2011, 6:02pm UTC](https://discuss.elastic.co/t/searchphaseexecutionexception-arrayindexoutofboundsexception-110/3961 "2011-02-22T18:02:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)\
**Post date:** [February 22, 2011, 6:02pm UTC](https://discuss.elastic.co/t/searchphaseexecutionexception-arrayindexoutofboundsexception-110/3961/1 "2011-02-22T18:02:29Z")

</div>

Hi,

The following java query works as a unit test, querying a remote (not  
same VM) elastic search instance. When I execute the same query  
through weblogic in response to a request, it fails with the above  
message. Any ideas?

```
	SearchResponse searchResponse = client.prepareSearch()
		.setIndices(indexes)
		.setTypes(types)
		.setQuery(queryString)
		.addSort(sortField, sortDirection)
		.setFrom(pageNumber)
		.setSize(pageSize)
		.execute().actionGet();

```

these are the values:

```
                 queryString = new

```

QueryStringBuilder("(listIds:"65008984") ")  
types = [employee,contact]  
indexes = [contactindex]  
sortField = personName  
sortDirection = ASC  
pageNumber = 0  
pageSize = 50

David.

---

<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:** [February 22, 2011, 6:26pm UTC](https://discuss.elastic.co/t/searchphaseexecutionexception-arrayindexoutofboundsexception-110/3961/2 "2011-02-22T18:26:30Z")

</div>

Is there anything in the logs?  
On Tuesday, February 22, 2011 at 8:02 PM, dalesrob wrote:

> Hi,
> 
> The following java query works as a unit test, querying a remote (not  
> same VM) Elasticsearch instance. When I execute the same query  
> through weblogic in response to a request, it fails with the above  
> message. Any ideas?
> 
> SearchResponse searchResponse = client.prepareSearch()  
> .setIndices(indexes)  
> .setTypes(types)  
> .setQuery(queryString)  
> .addSort(sortField, sortDirection)  
> .setFrom(pageNumber)  
> .setSize(pageSize)  
> .execute().actionGet();
> 
> these are the values:
> 
> queryString = new  
> QueryStringBuilder("(listIds:"65008984") ")  
> types = [employee,contact]  
> indexes = [contactindex]  
> sortField = personName  
> sortDirection = ASC  
> pageNumber = 0  
> pageSize = 50
> 
> David.

---

<div class="post-metadata">

**Author:** ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)\
**Post date:** [February 22, 2011, 6:36pm UTC](https://discuss.elastic.co/t/searchphaseexecutionexception-arrayindexoutofboundsexception-110/3961/3 "2011-02-22T18:36:21Z")

</div>

Hi Shay,

This is the Stack Trace I debugged, the version of Elasticsearch is  
0.13.1

java.lang.ArrayIndexOutOfBoundsException: 110  
110  
[org.elasticsearch.common.Unicode.UTF8toUTF16(Unicode.java:188),  
org.elasticsearch.common.Unicode.unsafeFromBytesAsUtf16(Unicode.java:  
104),  
org.elasticsearch.common.Unicode.fromBytes(Unicode.java:78),  
org.elasticsearch.search.SearchService.parseSource(SearchService.java:  
416),  
org.elasticsearch.search.SearchService.createContext(SearchService.java:  
335),  
org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:  
169),  
org.elasticsearch.search.action.SearchServiceTransportAction  
$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:  
376),  
org.elasticsearch.search.action.SearchServiceTransportAction  
$SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:  
367),  
org.elasticsearch.transport.netty.MessageChannelHandler  
$3.run(MessageChannelHandler.java:195),  
java.util.concurrent.ThreadPoolExecutor  
$Worker.runTask(ThreadPoolExecutor.java:885),  
java.util.concurrent.ThreadPoolExecutor  
$Worker.run(ThreadPoolExecutor.java:907),  
java.lang.Thread.run(Thread.java:619)]

On Feb 22, 6:02 pm, dalesrob [davirobe...@gmail.com](mailto:davirobe...@gmail.com) wrote:

> Hi,
> 
> The following java query works as a unit test, querying a remote (not  
> same VM) Elasticsearch instance. When I execute the same query  
> through weblogic in response to a request, it fails with the above  
> message. Any ideas?
> 
> ```
> SearchResponse searchResponse = client.prepareSearch()
> .setIndices(indexes)
> .setTypes(types)
> .setQuery(queryString)
> .addSort(sortField, sortDirection)
> .setFrom(pageNumber)
> .setSize(pageSize)
> .execute().actionGet();
> 
> ```
> 
> these are the values:
> 
> ```
> queryString = new
> 
> ```
> 
> QueryStringBuilder("(listIds:"65008984") ")  
> types = [employee,contact]  
> indexes = [contactindex]  
> sortField = personName  
> sortDirection = ASC  
> pageNumber = 0  
> pageSize = 50
> 
> David.

---

<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:** [February 22, 2011, 7:04pm UTC](https://discuss.elastic.co/t/searchphaseexecutionexception-arrayindexoutofboundsexception-110/3961/4 "2011-02-22T19:04:36Z")

</div>

Heya,

This exception happens when trying to wrap the actual exception that happens internally (basically, trying to build a string representation of the source passed, which in our case, its not a string). In other words, there is a failure, but its not propagated properly because of a failure in building the exception message :).

This has been fixed in 0.14 / 0.15. So you should get the actual failure now.

-shay.banon  
On Tuesday, February 22, 2011 at 8:36 PM, davrob2 wrote:

> Hi Shay,
> 
> This is the Stack Trace I debugged, the version of Elasticsearch is  
> 0.13.1
> 
> java.lang.ArrayIndexOutOfBoundsException: 110  
> 110  
> [org.elasticsearch.common.Unicode.UTF8toUTF16(Unicode.java:188),  
> org.elasticsearch.common.Unicode.unsafeFromBytesAsUtf16(Unicode.java:  
> 104),  
> org.elasticsearch.common.Unicode.fromBytes(Unicode.java:78),  
> org.elasticsearch.search.SearchService.parseSource(SearchService.java:  
> 416),  
> org.elasticsearch.search.SearchService.createContext(SearchService.java:  
> 335),  
> org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:  
> 169),  
> org.elasticsearch.search.action.SearchServiceTransportAction  
> $SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:  
> 376),  
> org.elasticsearch.search.action.SearchServiceTransportAction  
> $SearchQueryTransportHandler.messageReceived(SearchServiceTransportAction.java:  
> 367),  
> org.elasticsearch.transport.netty.MessageChannelHandler  
> $3.run(MessageChannelHandler.java:195),  
> java.util.concurrent.ThreadPoolExecutor  
> $Worker.runTask(ThreadPoolExecutor.java:885),  
> java.util.concurrent.ThreadPoolExecutor  
> $Worker.run(ThreadPoolExecutor.java:907),  
> java.lang.Thread.run(Thread.java:619)]
> 
> On Feb 22, 6:02 pm, dalesrob [davirobe...@gmail.com](mailto:davirobe...@gmail.com) wrote:
> 
> > Hi,
> > 
> > The following java query works as a unit test, querying a remote (not  
> > same VM) Elasticsearch instance. When I execute the same query  
> > through weblogic in response to a request, it fails with the above  
> > message. Any ideas?
> > 
> > SearchResponse searchResponse = client.prepareSearch()  
> > .setIndices(indexes)  
> > .setTypes(types)  
> > .setQuery(queryString)  
> > .addSort(sortField, sortDirection)  
> > .setFrom(pageNumber)  
> > .setSize(pageSize)  
> > .execute().actionGet();
> > 
> > these are the values:
> > 
> > queryString = new  
> > QueryStringBuilder("(listIds:"65008984") ")  
> > types = [employee,contact]  
> > indexes = [contactindex]  
> > sortField = personName  
> > sortDirection = ASC  
> > pageNumber = 0  
> > pageSize = 50
> > 
> > David.

---

<div class="post-metadata">

**Author:** ![davrob](https://avatars.discourse-cdn.com/v4/letter/d/d78d45/32.png) [@davrob](https://discuss.elastic.co/u/davrob)\
**Post date:** [February 23, 2011, 11:06am UTC](https://discuss.elastic.co/t/searchphaseexecutionexception-arrayindexoutofboundsexception-110/3961/5 "2011-02-23T11:06:56Z")

</div>

Hi Shay,

Move to 15.0 helped, got the correct error message back and corrected the  
issue with my code.

## David.

View this message in context: [http://elasticsearch-users.115913.n3.nabble.com/SearchPhaseExecutionException-ArrayIndexOutOfBoundsException-110-tp2554304p2559219.html](http://elasticsearch-users.115913.n3.nabble.com/SearchPhaseExecutionException-ArrayIndexOutOfBoundsException-110-tp2554304p2559219.html)  
Sent from the ElasticSearch Users mailing list archive at [Nabble.com](http://Nabble.com).

---

<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, 4:11am UTC](https://discuss.elastic.co/t/searchphaseexecutionexception-arrayindexoutofboundsexception-110/3961/6 "2017-07-06T04:11:39Z")

</div>


