I am trying to update a document using javaapi. But I am getting
concurrentexception. I have created a war and running in web context
My code looks like this
Client client = new TransportClient().addTransportAddress(newInetSocketTransportAddress(
"localhost", 9300));
UpdateRequestBuilder builder = client.prepareUpdate(index,type,docID);
builder.setSource(data.getBytes());
client.update(builder.request()).get();
Stacktrace is
java.util.concurrent.ExecutionException:
org.elasticsearch.transport.RemoteTrans
portException: [common-search-platform][inet[/127.0.0.1:9300]][update]
at
org.elasticsearch.common.util.concurrent.BaseFuture$Sync.getValue(Bas
eFuture.java:285)
at
org.elasticsearch.common.util.concurrent.BaseFuture$Sync.get(BaseFutu
re.java:272)
at
org.elasticsearch.common.util.concurrent.BaseFuture.get(BaseFuture.ja
va:113)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
a:298)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:859)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ss(Http11Protocol.java:588)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:48
9)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.elasticsearch.transport.RemoteTransportException:
[common-search-
platform][inet[/127.0.0.1:9300]][update]
Caused by: org.elasticsearch.action.ActionRequestValidationException:
Validation
Failed: 1: script or doc is missing;
at
org.elasticsearch.action.ValidateActions.addValidationError(ValidateA
ctions.java:29)
at
org.elasticsearch.action.update.UpdateRequest.validate(UpdateRequest.
java:95)
at
org.elasticsearch.action.support.TransportAction.execute(TransportAct
ion.java:55)
at
org.elasticsearch.action.support.single.instance.TransportInstanceSin
gleOperationAction$TransportHandler.messageReceived(TransportInstanceSingleOpera
tionAction.java:304)
at
org.elasticsearch.action.support.single.instance.TransportInstanceSin
gleOperationAction$TransportHandler.messageReceived(TransportInstanceSingleOpera
tionAction.java:288)
at
org.elasticsearch.transport.netty.MessageChannelHandler.handleRequest
(MessageChannelHandler.java:210)
at
org.elasticsearch.transport.netty.MessageChannelHandler.messageReceiv
ed(MessageChannelHandler.java:111)
at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.h
andleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUps
tream(DefaultChannelPipeline.java:560)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$Default
ChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(C
hannels.java:296)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfol
dAndFireMessageReceived(FrameDecoder.java:462)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.callD
ecode(FrameDecoder.java:443)
at
org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.messa
geReceived(FrameDecoder.java:303)
at
org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.h
andleUpstream(SimpleChannelUpstreamHandler.java:70)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUps
tream(DefaultChannelPipeline.java:560)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline$Default
ChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:787)
at
org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(Ope
nChannelsHandler.java:74)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUps
tream(DefaultChannelPipeline.java:560)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUps
tream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(C
hannels.java:268)
at
org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(C
hannels.java:255)
at
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioW
orker.java:88)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.p
rocess(AbstractNioWorker.java:107)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector
.run(AbstractNioSelector.java:312)
at
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.r
un(AbstractNioWorker.java:88)
at
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWo
rker.java:178)
at
org.elasticsearch.common.netty.util.ThreadRenamingRunnable.run(Thread
RenamingRunnable.java:108)
at
org.elasticsearch.common.netty.util.internal.DeadLockProofWorker$1.ru
n(DeadLockProofWorker.java:42)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:662)
--
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.
For more options, visit https://groups.google.com/groups/opt_out.