Getting NULL_POINTER_EXCEPTION with URI Search


(Ori Rubinfeld) #1

Hi,

We have Elasticsearch release 2.4.1

While running a URI Search, the results are:

curl -u uname:password -XGET 'localhost:9200/myindex/mytype/_search?q=myfield:123456&pretty'

{
"error" : {
"root_cause" : [ {
"type" : "null_pointer_exception",
"reason" : null
} ],
"type" : "null_pointer_exception",
"reason" : null
},
"status" : 500
}

Need help to understand the reason.
All fields are not in _all, and not analyzed.

Thanks,

Ori


(Isabel Drost-Fromm) #2

Can you check if there's more information in your logs?

Isabel


(Ori Rubinfeld) #3

[2017-01-18 13:34:59,030][WARN ][rest.suppressed ] path: /myindex/mytype/_search, params: {q=myfield:123456, index=myindex, type=mytype}
java.lang.NullPointerException
at org.elasticsearch.common.compress.lzf.LZFCompressor.isCompressed(LZFCompressor.java:54)
at org.elasticsearch.common.compress.CompressorFactory.compressor(CompressorFactory.java:74)
at org.elasticsearch.common.xcontent.XContentHelper.convertToMap(XContentHelper.java:67)
at org.elasticsearch.search.lookup.SourceLookup.sourceAsMapAndType(SourceLookup.java:88)
at org.elasticsearch.search.lookup.SourceLookup.sourceAsMap(SourceLookup.java:92)
at com.graphaware.es.gas.wrap.GraphAidedSearchActionListenerWrapper.wrap(GraphAidedSearchActionListenerWrapper.java:100)
at com.graphaware.es.gas.GraphAidedSearchFilter.apply(GraphAidedSearchFilter.java:66)
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:170)
at org.elasticsearch.action.support.ActionFilter$Simple.apply(ActionFilter.java:65)
at org.elasticsearch.action.support.TransportAction$RequestFilterChain.proceed(TransportAction.java:170)
at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:144)
at org.elasticsearch.action.support.TransportAction.execute(TransportAction.java:85)
at org.elasticsearch.client.node.NodeClient.doExecute(NodeClient.java:58)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359)
at org.elasticsearch.client.FilterClient.doExecute(FilterClient.java:52)
at org.elasticsearch.rest.BaseRestHandler$HeadersAndContextCopyClient.doExecute(BaseRestHandler.java:88)
at org.elasticsearch.client.support.AbstractClient.execute(AbstractClient.java:359)
at org.elasticsearch.client.support.AbstractClient.search(AbstractClient.java:582)
at org.elasticsearch.rest.action.search.RestSearchAction.handleRequest(RestSearchAction.java:85)
at org.elasticsearch.rest.BaseRestHandler.handleRequest(BaseRestHandler.java:54)
at org.elasticsearch.rest.RestController.executeHandler(RestController.java:198)
at org.elasticsearch.rest.RestController$RestHandlerFilter.process(RestController.java:280)
at org.elasticsearch.rest.RestController$ControllerFilterChain.continueProcessing(RestController.java:261)
at org.elasticsearch.plugin.readonlyrest.ReadonlyRestAction$1.process(ReadonlyRestAction.java:39)
at org.elasticsearch.rest.RestController$ControllerFilterChain.continueProcessing(RestController.java:264)
at org.elasticsearch.rest.RestController.dispatchRequest(RestController.java:161)
at org.elasticsearch.http.HttpServer.internalDispatchRequest(HttpServer.java:153)
at org.elasticsearch.http.HttpServer$Dispatcher.dispatchRequest(HttpServer.java:101)
at org.elasticsearch.http.netty.NettyHttpServerTransport.dispatchRequest(NettyHttpServerTransport.java:451)
at org.elasticsearch.http.netty.HttpRequestHandler.messageReceived(HttpRequestHandler.java:61)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.elasticsearch.http.netty.pipelining.HttpPipeliningHandler.messageReceived(HttpPipeliningHandler.java:60)
at org.jboss.netty.channel.SimpleChannelHandler.handleUpstream(SimpleChannelHandler.java:88)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)
at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)
at org.jboss.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:145)
at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)
at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)

    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:268)
    at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:255)
    at org.jboss.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:108)
    at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:337)
    at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)
    at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)
    at org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
    at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:42)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

(Ori Rubinfeld) #4

Had to cut it in the middle.....


(Jörg Prante) #5

You need jackson-dataformat-smile on your classpath. Does it exist?


(Ori Rubinfeld) #6

What is it ?


(Jörg Prante) #7

http://search.maven.org/#search|ga|1|a%3A"jackson-dataformat-smile"


(Ori Rubinfeld) #8

Which version should I need for Elastic 2.4.1 ?
How Do I install it ?

Ori


(Isabel Drost-Fromm) #9

How did you install that?


(Jörg Prante) #10

My question was, is it on the class path?

It's distributed by default in ES 2.4.1 tar.gz but maybe somebody removed it?


(Ori Rubinfeld) #11

Found it under the LIB subfolder.

How can I check the classpath ?
Where am I suppose to add it ?

Ori


(Ori Rubinfeld) #12

Can it be related to: http.cors.allow-origin ?

Ori


(Jörg Prante) #13

If it's in the lib subfolder, it's on the class path. Then it's another issue.


(Jörg Prante) #14

It's probably because _source is disabled, there is a NullPointerException issue related to this https://github.com/elastic/elasticsearch/issues/17666


(Ori Rubinfeld) #15

the _source is not disabled.
the _all is disabled.

I did not included fields in the _all

How can I know what is the classpath being used ?

Ori


(Jörg Prante) #16

Forget about the classpath, every jar in lib is included.

The strange thing is, that Elasticsearch throws the NPE you reported when it tries to open a field in the _source. Because it is null, it must be disabled or otherwise be corrupted.


(Ori Rubinfeld) #17

I tested it with other indexes and the results are the same.
NULL_POINTER_EXCEPTION, no matter which index I access.

I tried both analyzed and non analyzed fields.

Ori


(Jörg Prante) #18

The query and index access works flawlessly.

It's the document source that is accessed by your plugin com.graphaware.es.gas.GraphAidedSearchFilter that fails to work.


(Ori Rubinfeld) #19

I checked with an environment on which the plugin is not installed.
The Versions of ES are the same.
The Search working fine.

We will have to consider if to remove it.

Thanks!!!!


(system) #20

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.