SearchPhaseExecutionException -ArrayIndexOutOfBoundsException[110]

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.

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.

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 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.

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 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.

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
Sent from the ElasticSearch Users mailing list archive at Nabble.com.