Elasticsearch java interaction

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying
to communicate java elastisearch,i have gone through the elasticsearch java
api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have
just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

	// on shutdown

	client.close();
	
	Settings settings = ImmutableSettings.settingsBuilder()
	        .put("client.transport.sniff", true).build();
	TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded []
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to elastic search.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c7e70df2-85bc-47cd-a62e-08f89926d796%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

What is the value of ${es.version}

Did you set it? Try with 1.0.1
Also transport layer uses 9300 ports and not 9200 ports (REST layer)

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 14 mars 2014 à 13:47, Venu Krishna yvgk2010@gmail.com a écrit :

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying to communicate java elastisearch,i have gone through the elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

	// on shutdown

	client.close();
	
	Settings settings = ImmutableSettings.settingsBuilder()
	        .put("client.transport.sniff", true).build();
	TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded []
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to elastic search.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c7e70df2-85bc-47cd-a62e-08f89926d796%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/7390A48D-3F2C-46D2-B8D8-44A74314D83A%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Hi David Pilato,i have followed you suggestions but still facing the same
problem, you can see my new error is like this

java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at
org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x56b6d31c]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at
org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x52c11156]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at
org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x0e757105]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at
org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x043f68d7]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at
org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x71bb7179]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at
org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x034704d9]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at
org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x4ac91722]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at
org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at
org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at
org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at
org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at
org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at
org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:505)
at
org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at
org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at
org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Can you send me the any possible steps so that it will be helpful .

Thankyou in advance.

On Friday, March 14, 2014 6:17:02 PM UTC+5:30, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying
to communicate java elastisearch,i have gone through the elasticsearch java
api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have
just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6073eeaf-7dc3-4c73-bd0a-c39b5a579e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

I have no idea.
Not enough details about what you actually did.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 19 mars 2014 à 10:32:58, Venu Krishna (yvgk2010@gmail.com) a écrit:

Hi David Pilato,i have followed you suggestions but still facing the same problem, you can see my new error is like this

java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x56b6d31c]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x52c11156]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x0e757105]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x043f68d7]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x71bb7179]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x034704d9]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:502)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Mar 19, 2014 2:57:57 PM org.elasticsearch.transport.netty
WARNING: [Skullcrusher] Exception caught on netty layer [[id: 0x4ac91722]]
java.nio.channels.UnresolvedAddressException
at sun.nio.ch.Net.checkAddress(Unknown Source)
at sun.nio.ch.SocketChannelImpl.connect(Unknown Source)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:140)
at org.elasticsearch.common.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:103)
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline.java:555)
at org.elasticsearch.common.netty.channel.Channels.connect(Channels.java:541)
at org.elasticsearch.common.netty.channel.AbstractChannel.connect(AbstractChannel.java:218)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:227)
at org.elasticsearch.common.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:188)
at org.elasticsearch.transport.netty.NettyTransport.connectToChannels(NettyTransport.java:505)
at org.elasticsearch.transport.netty.NettyTransport.connectToNode(NettyTransport.java:473)
at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:126)
at org.elasticsearch.client.transport.TransportClientNodesService$ScheduledConnectNodeSampler.run(TransportClientNodesService.java:169)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Can you send me the any possible steps so that it will be helpful .

Thankyou in advance.

On Friday, March 14, 2014 6:17:02 PM UTC+5:30, Venu Krishna wrote:
Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying to communicate java elastisearch,i have gone through the elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have just placed the code that i found in maven repositry

         i.e. 
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

           // on shutdown

        client.close();
       
     Settings settings = ImmutableSettings.settingsBuilder()
               .put("client.transport.sniff", true).build();
        TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded []
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to elastic search.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6073eeaf-7dc3-4c73-bd0a-c39b5a579e1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.532965ea.1cf10fd8.97ca%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

Well
I think UnresolvedAddressException obviously means that your Java client
can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts
ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying
to communicate java elastisearch,i have gone through the elasticsearch java
api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have
just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e82efba3-b14b-44d2-97b2-6617bd4bcf6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java client
can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts
ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying
to communicate java elastisearch,i have gone through the elasticsearch java
api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have
just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk2010@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java client
can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts
ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am
trying to communicate java elastisearch,i have gone through the
elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i
have just placed the code that i found in maven repositry

         i.e.
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGKxwg%3DXd9m3EiuCLiSF1gLKi43Lke8uxsY0T7Sxxa6%2BnSe29w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thankyou for the reply.I am not getting any errors,but i am not able to
connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
    
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9200)); // This is where my control is getting stuck,without any
exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
    
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
    
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna <yvgk...@gmail.com <javascript:>>:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java
client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to
/etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am
trying to communicate java elastisearch,i have gone through the
elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i
have just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch
<artifactId>elasticsearch</artifactId>

<version>${es.version}</version>

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.

TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...

Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)

at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)

at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)

at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)

at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)

at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)

at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)

at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)

at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)

at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)

... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk2010@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
    
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 9200));   // This is where my control is getting stuck,without any exceptions or errors.
    
    
    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
    
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
    
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:
On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e. UnresolvedAddressException,but you are telling that to make sure host1 and host2 are resolved by adding entries to /etc/hosts to wherever the file in on Windows,for this can you give me the steps how to approach this.Sorry i am new to this and am learning i am unable to get the proper example.Thanks in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:
Well
I think UnresolvedAddressException obviously means that your Java client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:
Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying to communicate java elastisearch,i have gone through the elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch
<artifactId>elasticsearch</artifactId>

<version>${es.version}</version>

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.

TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...

Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)

at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)

at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)

at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)

at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)

at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)

at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)

at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)

at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)

at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)

... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/D671E637-E831-4593-8567-FCE8AC498D60%40pilato.fr.
For more options, visit https://groups.google.com/d/optout.

Actually this is my elasticsearch index http://localhost:9200/, as you
told i have replaced 9200 with 9300 in the above code ,then i executed the
application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna <yvgk...@gmail.com <javascript:>> a
écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to
connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
    
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9200)); // This is where my control is getting stuck,without any
exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
    
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
    
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java
client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to
/etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am
trying to communicate java elastisearch,i have gone through the
elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i
have just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch
<artifactId>elasticsearch</artifactId>

<version>${es.version}</version>

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.

TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...

Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)

at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)

at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)

at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)

at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)

at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)

at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)

at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)

at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)

at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)

... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e94ccdc1-62a9-49df-ba9b-182b397997ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your
local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to
proper IP address
Settings settings =
ImmutableSettings.settingsBuilder().put("cluster.name",
"vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:

Actually this is my elasticsearch index http://localhost:9200/, as you
told i have replaced 9200 with 9300 in the above code ,then i executed the
application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to
connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
    
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9200)); // This is where my control is getting stuck,without any
exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
    
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
    
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java
client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to
/etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am
trying to communicate java elastisearch,i have gone through the
elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i
have just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch
<artifactId>elasticsearch</artifactId>

<version>${es.version}</version>

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.

TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...

Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)

at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)

at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)

at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)

at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)

at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)

at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)

at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)

at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)

at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)

... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bff86816-0801-4f23-ba11-4011d00687fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

you can find my elasticsearch window i.e overview window and browse window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my
knowledge i have not created,but from ES site i came to know that cluster
will be created bydefault and node aswell,but i have not given any cluster
name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is
happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");
    
client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9300));

    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this 

resolvs to proper IP address
Settings settings =
ImmutableSettings.settingsBuilder().put("cluster.name",
"vesseltrackerES").build();

      TransportClient transportClient = new TransportClient(settings);
      for (String host : this.hosts) {
    transportClient = transportClient.addTransportAddress(new 

InetSocketTransportAddress(host, 9200));
}

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {
    
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();
    
}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:

There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your
local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to
proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:

Actually this is my elasticsearch index http://localhost:9200/, as you
told i have replaced 9200 with 9300 in the above code ,then i executed the
application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to
connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
    
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9200)); // This is where my control is getting stuck,without any
exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
    
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
    
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java
client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to
/etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am
trying to communicate java elastisearch,i have gone through the
elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i
have just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch
<artifactId>elasticsearch</artifactId>

<version>${es.version}</version>

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.

TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...

Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)

at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)

at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)

at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)

at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)

at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)

at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)

at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)

at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)

at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)

... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6761c3cc-837a-454a-8f3f-46fc7a873007%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

On Friday, March 21, 2014 3:39:36 PM UTC+5:30, Venu Krishna wrote:

you can find my elasticsearch window i.e overview window and browse
window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my
knowledge i have not created,but from ES site i came to know that cluster
will be created bydefault and node aswell,but i have not given any cluster
name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is
happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");
    
client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9300));

    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this 

resolvs to proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

      TransportClient transportClient = new TransportClient(settings);
      for (String host : this.hosts) {
    transportClient = transportClient.addTransportAddress(new 

InetSocketTransportAddress(host, 9200));
}

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {
    
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();
    
}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:

There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your
local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to
proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:

Actually this is my elasticsearch index http://localhost:9200/, as you
told i have replaced 9200 with 9300 in the above code ,then i executed the
application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to
connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
    
    Client client = new TransportClient()
    .addTransportAddress(new 

InetSocketTransportAddress("localhost", 9200)); // This is where my
control is getting stuck,without any exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
    
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
    
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java
client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to
/etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am
trying to communicate java elastisearch,i have gone through the
elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag
i have just placed the code that i found in maven repositry

         i.e.  
org.elasticsearch
<artifactId>elasticsearch</artifactId>

<version>${es.version}</version>

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.

TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

  // on shutdown

  client.close();
  
  Settings settings = ImmutableSettings.settingsBuilder()
          .put("client.transport.sniff", true).build();
  TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...

Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)

at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)

at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)

at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)

at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)

at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)

at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)

at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)

at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)

at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)

at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)

at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)

at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)

at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)

at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)

at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)

at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)

at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)

... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/36600c42-5026-4bd7-a75c-069ed12e78f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Do this:

public class JavaES_Client {

private static Client client;

private static void buildClient() {
    Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();
    client = new TransportClient(settings)
            .addTransportAddress(new InetSocketTransportAddress("localhost", 9300));
}

public static void main(String[] args) {

    buildClient();

    SearchResponse response = client.prepareSearch().execute().actionGet();
    System.out.println("response.getHits().totalHits() = " + response.getHits().totalHits());
}

}

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 21 mars 2014 à 11:10:56, Venu Krishna (yvgk2010@gmail.com) a écrit:

On Friday, March 21, 2014 3:39:36 PM UTC+5:30, Venu Krishna wrote:
you can find my elasticsearch window i.e overview window and browse window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my knowledge i have not created,but from ES site i came to know that cluster will be created bydefault and node aswell,but i have not given any cluster name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");
   
client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 9300));
   
   
    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to proper IP address
      Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();

      TransportClient transportClient = new TransportClient(settings);
      for (String host : this.hosts) {
    transportClient = transportClient.addTransportAddress(new InetSocketTransportAddress(host, 9200));
      }

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();
   
}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:
There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:
Actually this is my elasticsearch index http://localhost:9200/, as you told i have replaced 9200 with 9300 in the above code ,then i executed the application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:
Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
   
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 9200));   // This is where my control is getting stuck,without any exceptions or errors.
   
   
    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
   
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:
On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:
Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e. UnresolvedAddressException,but you are telling that to make sure host1 and host2 are resolved by adding entries to /etc/hosts to wherever the file in on Windows,for this can you give me the steps how to approach this.Sorry i am new to this and am learning i am unable to get the proper example.Thanks in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:
Well
I think UnresolvedAddressException obviously means that your Java client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:
Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying to communicate java elastisearch,i have gone through the elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have just placed the code that i found in maven repositry

         i.e. 
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

     // on shutdown

        client.close();
       
     Settings settings = ImmutableSettings.settingsBuilder()
             .put("client.transport.sniff", true).build();
        TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded []
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to elastic search.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/36600c42-5026-4bd7-a75c-069ed12e78f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.532c1204.3a95f874.c9bd%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

Exceptions and Warnings when i run the above code.

Mar 21, 2014 4:29:53 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:57 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:58 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:02 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:03 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:07 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:08 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:12 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:13 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:17 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:18 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:22 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:23 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:27 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:28 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Exception in thread "main"
org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:139)
at
org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:238)
at
org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:300)
at
org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:579)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)
at JavaES_Client.main(JavaES_Client.java:82)

On Friday, March 21, 2014 3:48:44 PM UTC+5:30, David Pilato wrote:

Do this:

public class JavaES_Client {

private static Client client;

private static void buildClient() {
    Settings settings = ImmutableSettings.settingsBuilder().put("

cluster.name", "vesseltrackerES").build();
client = new TransportClient(settings)
.addTransportAddress(new
InetSocketTransportAddress("localhost", 9300));
}

public static void main(String[] args) {

    buildClient();

    SearchResponse response = 

client.prepareSearch().execute().actionGet();
System.out.println("response.getHits().totalHits() = " +
response.getHits().totalHits());
}

}

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 11:10:56, Venu Krishna (yvgk...@gmail.com <javascript:>)
a écrit:

On Friday, March 21, 2014 3:39:36 PM UTC+5:30, Venu Krishna wrote:

you can find my elasticsearch window i.e overview window and browse
window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my
knowledge i have not created,but from ES site i came to know that cluster
will be created bydefault and node aswell,but i have not given any cluster
name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is
happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");
   
client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9300));

    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this 

resolvs to proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

      TransportClient transportClient = new TransportClient(settings);
      for (String host : this.hosts) {
    transportClient = transportClient.addTransportAddress(new 

InetSocketTransportAddress(host, 9200));
}

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();
   
}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:

There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your
local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to
proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:

Actually this is my elasticsearch index http://localhost:9200/, as
you told i have replaced 9200 with 9300 in the above code ,then i executed
the application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able
to connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
   
    Client client = new TransportClient()
    .addTransportAddress(new 

InetSocketTransportAddress("localhost", 9200)); // This is where my
control is getting stuck,without any exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
   
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov
wrote:

Well
I think UnresolvedAddressException obviously means that your Java
client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to
/etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am
trying to communicate java elastisearch,i have gone through the
elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag
i have just placed the code that i found in maven repositry

         i.e. 
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

     // on shutdown

        client.close();
      
     Settings settings = ImmutableSettings.settingsBuilder()
             .put("client.transport.sniff", true).build();
        TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

 --

You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe
.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com?utm_medium=email&utm_source=footer.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--

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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/36600c42-5026-4bd7-a75c-069ed12e78f6%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/36600c42-5026-4bd7-a75c-069ed12e78f6%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/07952eeb-d71b-472e-ab19-7b1dd8427a42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Works fine for me.

Either your elasticsearch is not running locally, or your cluster name is not vesseltrackerES or you have some firewall issues.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 21 mars 2014 à 12:02:20, Venu Krishna (yvgk2010@gmail.com) a écrit:

Exceptions and Warnings when i run the above code.

Mar 21, 2014 4:29:53 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:57 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:58 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:02 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:03 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:07 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:08 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:12 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:13 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:17 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:18 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:22 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:23 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:27 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:28 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: No node available
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:139)
at org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:238)
at org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:300)
at org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:579)
at org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)
at org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)
at JavaES_Client.main(JavaES_Client.java:82)

On Friday, March 21, 2014 3:48:44 PM UTC+5:30, David Pilato wrote:
Do this:

public class JavaES_Client {

private static Client client;

private static void buildClient() {
    Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();
    client = new TransportClient(settings)
            .addTransportAddress(new InetSocketTransportAddress("localhost", 9300));
}

public static void main(String[] args) {

    buildClient();

    SearchResponse response = client.prepareSearch().execute().actionGet();
    System.out.println("response.getHits().totalHits() = " + response.getHits().totalHits());
}

}

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 21 mars 2014 à 11:10:56, Venu Krishna (yvgk...@gmail.com) a écrit:

On Friday, March 21, 2014 3:39:36 PM UTC+5:30, Venu Krishna wrote:
you can find my elasticsearch window i.e overview window and browse window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my knowledge i have not created,but from ES site i came to know that cluster will be created bydefault and node aswell,but i have not given any cluster name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");
   
client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 9300));
   
   
    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to proper IP address
      Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();

      TransportClient transportClient = new TransportClient(settings);
      for (String host : this.hosts) {
    transportClient = transportClient.addTransportAddress(new InetSocketTransportAddress(host, 9200));
      }

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();
   
}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:
There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:
Actually this is my elasticsearch index http://localhost:9200/, as you told i have replaced 9200 with 9300 in the above code ,then i executed the application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:
Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
   
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 9200));   // This is where my control is getting stuck,without any exceptions or errors.
   
   
    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
   
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:
On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:
Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e. UnresolvedAddressException,but you are telling that to make sure host1 and host2 are resolved by adding entries to /etc/hosts to wherever the file in on Windows,for this can you give me the steps how to approach this.Sorry i am new to this and am learning i am unable to get the proper example.Thanks in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:
Well
I think UnresolvedAddressException obviously means that your Java client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:
Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying to communicate java elastisearch,i have gone through the elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have just placed the code that i found in maven repositry

         i.e. 
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

     // on shutdown

        client.close();
       
     Settings settings = ImmutableSettings.settingsBuilder()
             .put("client.transport.sniff", true).build();
        TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded []
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to elastic search.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/36600c42-5026-4bd7-a75c-069ed12e78f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/07952eeb-d71b-472e-ab19-7b1dd8427a42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.532c2270.6b8b4567.db6a%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

His cluster name is not right , because it is my cluster name :slight_smile:

If you did not change the cluster name , it is the default one :
elasticsearch

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",
"elasticsearch").build();

2014-03-21 12:28 GMT+01:00 David Pilato david@pilato.fr:

Works fine for me.

Either your elasticsearch is not running locally, or your cluster name is
not vesseltrackerES or you have some firewall issues.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 12:02:20, Venu Krishna (yvgk2010@gmail.com) a écrit:

Exceptions and Warnings when i run the above code.

Mar 21, 2014 4:29:53 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:57 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:58 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:02 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:03 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:07 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:08 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:12 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:13 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:17 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:18 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:22 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:23 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:27 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:28 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Exception in thread "main"
org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:139)
at
org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:238)
at
org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:300)
at
org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:579)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)
at JavaES_Client.main(JavaES_Client.java:82)

On Friday, March 21, 2014 3:48:44 PM UTC+5:30, David Pilato wrote:

Do this:

public class JavaES_Client {

private static Client client;

private static void buildClient() {
    Settings settings = ImmutableSettings.settingsBuilder().put("

cluster.name", "vesseltrackerES").build();
client = new TransportClient(settings)
.addTransportAddress(new InetSocketTransportAddress("localhost",
9300));
}

public static void main(String[] args) {

    buildClient();

    SearchResponse response = client.prepareSearch().

execute().actionGet();
System.out.println("response.getHits().totalHits() = " +
response.getHits().totalHits());
}

}

 --

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 11:10:56, Venu Krishna (yvgk...@gmail.com) a écrit:

On Friday, March 21, 2014 3:39:36 PM UTC+5:30, Venu Krishna wrote:

you can find my elasticsearch window i.e overview window and browse
window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my
knowledge i have not created,but from ES site i came to know that cluster
will be created bydefault and node aswell,but i have not given any cluster
name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is
happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");

client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost",

9300));

    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this

resolvs to proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

      TransportClient transportClient = new

TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress(host, 9200));
}

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {

    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();

}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:

There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your
local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to
proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("cluster
.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:

Actually this is my elasticsearch index http://localhost:9200/, as
you told i have replaced 9200 with 9300 in the above code ,then i executed
the application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not
able to connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");

    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost",

9200)); // This is where my control is getting stuck,without any
exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {

    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();

}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov
wrote:

Well
I think UnresolvedAddressException obviously means that your Java
client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to
/etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i
am trying to communicate java elastisearch,i have gone through the
elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency
tag i have just placed the code that i found in maven repositry

         i.e.
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

     // on shutdown

        client.close();

     Settings settings = ImmutableSettings.settingsBuilder()
             .put("client.transport.sniff", true).build();
        TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

 --

You received this message because you are subscribed to a topic in
the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearc...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/bc5accc6-
106b-485d-a4da-ad1efed9db74%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com?utm_medium=email&utm_source=footer.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%
40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--

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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/elasticsearch/36600c42-5026-4bd7-a75c-069ed12e78f6%
40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/36600c42-5026-4bd7-a75c-069ed12e78f6%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

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

To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/07952eeb-d71b-472e-ab19-7b1dd8427a42%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/07952eeb-d71b-472e-ab19-7b1dd8427a42%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/etPan.532c2270.6b8b4567.db6a%40MacBook-Air-de-David.localhttps://groups.google.com/d/msgid/elasticsearch/etPan.532c2270.6b8b4567.db6a%40MacBook-Air-de-David.local?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGKxwgkhYBvm_K30LBc7kgH%3DB-iGfvCe9_o1nJGPUgrm-1ZK7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Haha! :slight_smile:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 21 mars 2014 à 14:27:26, Georgi Ivanov (georgi.r.ivanov@gmail.com) a écrit:

His cluster name is not right , because it is my cluster name :slight_smile:

If you did not change the cluster name , it is the default one : elasticsearch

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "elasticsearch").build();

2014-03-21 12:28 GMT+01:00 David Pilato david@pilato.fr:
Works fine for me.

Either your elasticsearch is not running locally, or your cluster name is not vesseltrackerES or you have some firewall issues.

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 21 mars 2014 à 12:02:20, Venu Krishna (yvgk2010@gmail.com) a écrit:

Exceptions and Warnings when i run the above code.

Mar 21, 2014 4:29:53 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:57 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:58 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:02 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:03 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:07 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:08 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:12 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:13 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:17 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:18 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:22 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:23 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:27 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:28 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Exception in thread "main" org.elasticsearch.client.transport.NoNodeAvailableException: No node available
at org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:139)
at org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:238)
at org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:300)
at org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:579)
at org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)
at org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)
at JavaES_Client.main(JavaES_Client.java:82)

On Friday, March 21, 2014 3:48:44 PM UTC+5:30, David Pilato wrote:
Do this:

public class JavaES_Client {

private static Client client;

private static void buildClient() {
    Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();
    client = new TransportClient(settings)
            .addTransportAddress(new InetSocketTransportAddress("localhost", 9300));
}

public static void main(String[] args) {

    buildClient();

    SearchResponse response = client.prepareSearch().execute().actionGet();
    System.out.println("response.getHits().totalHits() = " + response.getHits().totalHits());
}

}

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr

Le 21 mars 2014 à 11:10:56, Venu Krishna (yvgk...@gmail.com) a écrit:

On Friday, March 21, 2014 3:39:36 PM UTC+5:30, Venu Krishna wrote:
you can find my elasticsearch window i.e overview window and browse window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my knowledge i have not created,but from ES site i came to know that cluster will be created bydefault and node aswell,but i have not given any cluster name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");
   
client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 9300));
   
   
    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to proper IP address
      Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();

      TransportClient transportClient = new TransportClient(settings);
      for (String host : this.hosts) {
    transportClient = transportClient.addTransportAddress(new InetSocketTransportAddress(host, 9200));
      }

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();
   
}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:
There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:
Actually this is my elasticsearch index http://localhost:9200/, as you told i have replaced 9200 with 9300 in the above code ,then i executed the application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for [#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [][inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:
Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
   
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 9200));   // This is where my control is getting stuck,without any exceptions or errors.
   
   
    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
   
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:
On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:
Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e. UnresolvedAddressException,but you are telling that to make sure host1 and host2 are resolved by adding entries to /etc/hosts to wherever the file in on Windows,for this can you give me the steps how to approach this.Sorry i am new to this and am learning i am unable to get the proper example.Thanks in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:
Well
I think UnresolvedAddressException obviously means that your Java client can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:
Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying to communicate java elastisearch,i have gone through the elasticsearch java api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have just placed the code that i found in maven repositry

         i.e. 
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

     // on shutdown

        client.close();
       
     Settings settings = ImmutableSettings.settingsBuilder()
             .put("client.transport.sniff", true).build();
        TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded []
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to elastic search.

any basic application so that i can look and get some idea.

URGENT PLZ

Thanks in advance.

Regards Venu.Y

--
You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/bc5accc6-106b-485d-a4da-ad1efed9db74%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e3b85b33-6203-4758-9788-2846e9d69b85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/36600c42-5026-4bd7-a75c-069ed12e78f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

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.

To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/07952eeb-d71b-472e-ab19-7b1dd8427a42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elasticsearch/X6dmbQE7pFc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.532c2270.6b8b4567.db6a%40MacBook-Air-de-David.local.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGKxwgkhYBvm_K30LBc7kgH%3DB-iGfvCe9_o1nJGPUgrm-1ZK7A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/etPan.532c4f3c.74b0dc51.db6a%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.

yes,due to my ignorance i have blindly copied any run the code,but now i
have modified it to the default clustername.

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

private static Client client;

private static void buildClient() {
    Settings settings = 

ImmutableSettings.settingsBuilder().put("cluster.name",
"elasticsearch").build();
client = new TransportClient(settings)
.addTransportAddress(new
InetSocketTransportAddress("localhost", 9200));
}

public static void main(String[] args) {

    buildClient();

    SearchResponse response = 

client.prepareSearch().execute().actionGet();
System.out.println("response.getHits().totalHits() = " +
response.getHits().totalHits());
}

}

On Friday, March 21, 2014 8:09:56 PM UTC+5:30, David Pilato wrote:

Haha! :slight_smile:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 14:27:26, Georgi Ivanov (georgi....@gmail.com<javascript:>)
a écrit:

His cluster name is not right , because it is my cluster name :slight_smile:

If you did not change the cluster name , it is the default one :
elasticsearch

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",
"elasticsearch").build();

2014-03-21 12:28 GMT+01:00 David Pilato <da...@pilato.fr <javascript:>>:

Works fine for me.

Either your elasticsearch is not running locally, or your cluster name is
not vesseltrackerES or you have some firewall issues.

 -- 

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 12:02:20, Venu Krishna (yvgk...@gmail.com <javascript:>)
a écrit:

Exceptions and Warnings when i run the above code.

Mar 21, 2014 4:29:53 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:57 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:58 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:02 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:03 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:07 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:08 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:12 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:13 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:17 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:18 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:22 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:23 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:27 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:28 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Exception in thread "main"
org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:139)
at
org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:238)
at
org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:300)
at
org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:579)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)
at JavaES_Client.main(JavaES_Client.java:82)

On Friday, March 21, 2014 3:48:44 PM UTC+5:30, David Pilato wrote:

Do this:

public class JavaES_Client {

private static Client client;

private static void buildClient() {
    Settings settings = ImmutableSettings.settingsBuilder().put("

cluster.name", "vesseltrackerES").build();
client = new TransportClient(settings)
.addTransportAddress(new
InetSocketTransportAddress("localhost", 9300));
}

public static void main(String[] args) {

    buildClient();

    SearchResponse response = 

client.prepareSearch().execute().actionGet();
System.out.println("response.getHits().totalHits() = " +
response.getHits().totalHits());
}

}

 -- 

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 11:10:56, Venu Krishna (yvgk...@gmail.com) a écrit:

On Friday, March 21, 2014 3:39:36 PM UTC+5:30, Venu Krishna wrote:

you can find my elasticsearch window i.e overview window and browse window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my
knowledge i have not created,but from ES site i came to know that cluster
will be created bydefault and node aswell,but i have not given any cluster
name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is
happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");
   
client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9300));

    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this 

resolvs to proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

      TransportClient transportClient = new TransportClient(settings);
      for (String host : this.hosts) {
    transportClient = transportClient.addTransportAddress(new 

InetSocketTransportAddress(host, 9200));
}

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();
   
}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:

There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your
local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to
proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:

Actually this is my elasticsearch index http://localhost:9200/, as you
told i have replaced 9200 with 9300 in the above code ,then i executed the
application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [inet[localhost/
127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [inet[localhost/
127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [inet[localhost/
127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to
connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
   
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9200)); // This is where my control is getting stuck,without any
exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
   
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java client
can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts
ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying
to communicate java elastisearch,i have gone through the elasticsearch java
api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have
just placed the code that i found in maven repositry

         i.e. 
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

     // on shutdown

        client.close();
      
     Settings settings = ImmutableSettings.settingsBuilder()
             .put("client.transport.sniff", true).build();
        TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.<

...

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/680a66b7-a306-4370-aab4-49e04cd042c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

now after execution ,i am seeing

Mar 22, 2014 2:12:55 PM org.elasticsearch.client.transport
WARNING: [Shingen Harada] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Exception in thread "main"
org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:139)
at
org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:238)
at
org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:300)
at
org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:579)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)
at JavaES_Client.main(JavaES_Client.java:82)

On Friday, March 21, 2014 8:09:56 PM UTC+5:30, David Pilato wrote:

Haha! :slight_smile:

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 14:27:26, Georgi Ivanov (georgi....@gmail.com<javascript:>)
a écrit:

His cluster name is not right , because it is my cluster name :slight_smile:

If you did not change the cluster name , it is the default one :
elasticsearch

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",
"elasticsearch").build();

2014-03-21 12:28 GMT+01:00 David Pilato <da...@pilato.fr <javascript:>>:

Works fine for me.

Either your elasticsearch is not running locally, or your cluster name is
not vesseltrackerES or you have some firewall issues.

 -- 

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 12:02:20, Venu Krishna (yvgk...@gmail.com <javascript:>)
a écrit:

Exceptions and Warnings when i run the above code.

Mar 21, 2014 4:29:53 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:57 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:29:58 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:02 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:03 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:07 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:08 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:12 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:13 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:17 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:18 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:22 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:23 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:27 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 21, 2014 4:30:28 PM org.elasticsearch.client.transport
WARNING: [Woodgod] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException:
[inet[localhost/127.0.0.1:9300]][/cluster/nodes/info] disconnected

Exception in thread "main"
org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at
org.elasticsearch.client.transport.TransportClientNodesService.execute(TransportClientNodesService.java:139)
at
org.elasticsearch.client.transport.support.InternalTransportClient.search(InternalTransportClient.java:238)
at
org.elasticsearch.client.transport.TransportClient.search(TransportClient.java:300)
at
org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(SearchRequestBuilder.java:579)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:56)
at
org.elasticsearch.client.action.support.BaseRequestBuilder.execute(BaseRequestBuilder.java:51)
at JavaES_Client.main(JavaES_Client.java:82)

On Friday, March 21, 2014 3:48:44 PM UTC+5:30, David Pilato wrote:

Do this:

public class JavaES_Client {

private static Client client;

private static void buildClient() {
    Settings settings = ImmutableSettings.settingsBuilder().put("

cluster.name", "vesseltrackerES").build();
client = new TransportClient(settings)
.addTransportAddress(new
InetSocketTransportAddress("localhost", 9300));
}

public static void main(String[] args) {

    buildClient();

    SearchResponse response = 

client.prepareSearch().execute().actionGet();
System.out.println("response.getHits().totalHits() = " +
response.getHits().totalHits());
}

}

 -- 

David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfrhttps://twitter.com/elasticsearchfr

Le 21 mars 2014 à 11:10:56, Venu Krishna (yvgk...@gmail.com) a écrit:

On Friday, March 21, 2014 3:39:36 PM UTC+5:30, Venu Krishna wrote:

you can find my elasticsearch window i.e overview window and browse window.
my java code you can see below.

from these windows i think you can get what i am doing.
i just create new indexes with type and their id simply .
before this i din't created any cluster or any node e.t.c. ,from my
knowledge i have not created,but from ES site i came to know that cluster
will be created bydefault and node aswell,but i have not given any cluster
name or any specific thing or nodes.

i think i am not making any complication about this.

but to be frank..i am moving here and there like a child to know what is
happening.

Java Code

import java.net.InetSocketAddress;
import java.util.HashSet;
import java.util.Set;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

Client client;
Set<String> hosts;

void function()
{
    //on StartUp
            System.out.println("In Function");
   
client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9300));

    System.out.println("Connected");
    //on ShutDown
    client.close();
}

 void connectES() {
    hosts = new HashSet<String>();
      hosts.add("locolhost");
    //  hosts.add("host2.host1.mydomain.com"); // Make sure this 

resolvs to proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

      TransportClient transportClient = new TransportClient(settings);
      for (String host : this.hosts) {
    transportClient = transportClient.addTransportAddress(new 

InetSocketTransportAddress(host, 9200));
}

      System.out.print("Connected to nodes : ");
      for (DiscoveryNode node : transportClient.connectedNodes()) {
    System.out.print(node.getName() + " , ");
      }
      System.out.println("");

      this.client = (Client) transportClient;
    }


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
//    jc.function();
    jc.connectES();
   
}

}

On Thursday, March 20, 2014 8:41:08 PM UTC+5:30, Georgi Ivanov wrote:

There is something wrong with your set-up

How many ES node s you have ?
On which IP addresses are ES hosts listening ?

I understood you have 2 hosts , but it seems you have only one on your
local machine .

This is the code (a bit modified) I am using at the moment

public void connectES() {
Set hosts = new HashSet();
hosts.add("host1.mydomain.com");
hosts.add("host2.host1.mydomain.com"); // Make sure this resolvs to
proper IP address
Settings settings = ImmutableSettings.settingsBuilder().put("
cluster.name", "vesseltrackerES").build();

TransportClient transportClient = new TransportClient(settings);
for (String host : this.hosts) {
transportClient = transportClient.addTransportAddress(new
InetSocketTransportAddress(host, 9300));
}

System.out.print("Connected to nodes : ");
for (DiscoveryNode node : transportClient.connectedNodes()) {
System.out.print(node.getHostName() + " , ");
}
System.out.println("");

this.client = (Client) transportClient;
}

On Thursday, March 20, 2014 2:51:50 PM UTC+1, Venu Krishna wrote:

Actually this is my elasticsearch index http://localhost:9200/, as you
told i have replaced 9200 with 9300 in the above code ,then i executed the
application i am getting following exceptions.

Mar 20, 2014 7:17:45 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [inet[localhost/
127.0.0.1:9300]][/cluster/nodes/info] disconnected

Connected
Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [inet[localhost/
127.0.0.1:9300]][/cluster/nodes/info] disconnected

Mar 20, 2014 7:17:50 PM org.elasticsearch.client.transport
WARNING: [Bailey, Gailyn] failed to get node info for
[#transport#-1][inet[localhost/127.0.0.1:9300]]
org.elasticsearch.transport.NodeDisconnectedException: [inet[localhost/
127.0.0.1:9300]][/cluster/nodes/info] disconnected

Thankyou

On Thursday, March 20, 2014 7:12:14 PM UTC+5:30, David Pilato wrote:

Use port 9300

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 20 mars 2014 à 14:34, Venu Krishna yvgk...@gmail.com a écrit :

Thankyou for the reply.I am not getting any errors,but i am not able to
connect to my elasticsearch using java.Here my code.

import java.net.InetSocketAddress;

import org.elasticsearch.client.Client;
import org.elasticsearch.client.transport.TransportClient;
import org.elasticsearch.common.transport.InetSocketTransportAddress;

public class JavaES_Client {

void function()
{
    //on StartUp
            System.out.println("In Function");
   
    Client client = new TransportClient()
    .addTransportAddress(new InetSocketTransportAddress("localhost", 

9200)); // This is where my control is getting stuck,without any
exceptions or errors.

    System.out.println("Connected");
    //on ShutDown
    client.close();
}


public static void main(String[] args) {
   
    System.out.println("In Main Method");
    JavaES_Client jc = new JavaES_Client();
    System.out.println("Object Created");
    jc.function();
   
}

}

On Thursday, March 20, 2014 2:20:25 PM UTC+5:30, Georgi Ivanov wrote:

On Linux the file is /etc/hosts
On Windows c:\windows\system32\drivers\etc\hosts

Open the file in text editor

Add following lines:
192.168.1.100 host1
192.168.1.101 host2

Make sure that 192.168.1.100/101 is the right IP address of the
host1/host2

2014-03-20 8:35 GMT+01:00 Venu Krishna yvgk...@gmail.com:

Hi Georgi Ivanov,
yes,i am able to understand the Exception i.e.
UnresolvedAddressException,but you are telling that to make sure host1 and
host2 are resolved by adding entries to /etc/hosts to wherever the file in
on Windows,for this can you give me the steps how to approach this.Sorry i
am new to this and am learning i am unable to get the proper example.Thanks
in advance for the help.

On Thursday, March 20, 2014 2:36:10 AM UTC+5:30, Georgi Ivanov wrote:

Well
I think UnresolvedAddressException obviously means that your Java client
can not resolve host1 and host2

make sure host1 and host2 are resolvable by adding entries to /etc/hosts
ot wherever the file in on Windows

On Friday, March 14, 2014 1:47:02 PM UTC+1, Venu Krishna wrote:

Hi,
I am Y.Venu,i am totally new to this elasticsearch,now i am trying
to communicate java elastisearch,i have gone through the elasticsearch java
api's

1st i came across maven repositry.
i have created pom.xml in my eclipse and in the dependency tag i have
just placed the code that i found in maven repositry

         i.e. 
org.elasticsearch elasticsearch ${es.version}

After that i have created one class with the main method and i copied and placed the code that i found in the client api of elasticsearch i.e.
TransportClient.

main()
{
Client client = new TransportClient()
.addTransportAddress(new InetSocketTransportAddress("host1", 9200))
.addTransportAddress(new InetSocketTransportAddress("host2", 9200));

     // on shutdown

        client.close();
      
     Settings settings = ImmutableSettings.settingsBuilder()
             .put("client.transport.sniff", true).build();
        TransportClient client1 = new TransportClient(settings);

}

After running this app javapplication,i am getting the errors like this

In Main Method
Mar 14, 2014 6:05:24 PM org.elasticsearch.node
INFO: [Mister Machine] {elasticsearch/0.16.1}[11016]: initializing ...
Mar 14, 2014 6:05:24 PM org.elasticsearch.plugins
INFO: [Mister Machine] loaded
org.elasticsearch.common.inject.internal.ComputationException: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.ConstructorInjectorStore.get(ConstructorInjectorStore.java:52)
at org.elasticsearch.common.inject.ConstructorBindingImpl.initialize(ConstructorBindingImpl.java:57)
at org.elasticsearch.common.inject.InjectorImpl.initializeBinding(InjectorImpl.java:377)
at org.elasticsearch.common.inject.BindingProcessor$1$1.run(BindingProcessor.java:169)
at org.elasticsearch.common.inject.BindingProcessor.initializeBindings(BindingProcessor.java:224)
at org.elasticsearch.common.inject.InjectorBuilder.initializeStatically(InjectorBuilder.java:120)
at org.elasticsearch.common.inject.InjectorBuilder.build(InjectorBuilder.java:105)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:92)
at org.elasticsearch.common.inject.Guice.createInjector(Guice.java:69)
at org.elasticsearch.common.inject.ModulesBuilder.createInjector(ModulesBuilder.java:58)
at org.elasticsearch.node.internal.InternalNode.(InternalNode.java:146)
at org.elasticsearch.node.NodeBuilder.build(NodeBuilder.java:159)
at org.elasticsearch.node.NodeBuilder.node(NodeBuilder.java:166)
at ES_Client.main(ES_Client.java:64)
Caused by: org.elasticsearch.common.inject.internal.ComputationException: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:553)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:419)
at org.elasticsearch.common.inject.internal.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2041)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:46)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:66)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:69)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:31)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:39)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:35)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Lorg/apache/lucene/store/Lock;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:386)
at org.elasticsearch.common.inject.spi.InjectionPoint$Factory$1.getMembers(InjectionPoint.java:384)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectorsForMembers(InjectionPoint.java:359)
at org.elasticsearch.common.inject.spi.InjectionPoint.addInjectionPoints(InjectionPoint.java:353)
at org.elasticsearch.common.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:295)
at org.elasticsearch.common.inject.MembersInjectorStore.createWithListeners(MembersInjectorStore.java:78)
at org.elasticsearch.common.inject.MembersInjectorStore.access$000(MembersInjectorStore.java:35)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:43)
at org.elasticsearch.common.inject.MembersInjectorStore$1.create(MembersInjectorStore.java:40)
at org.elasticsearch.common.inject.internal.FailableCache$1.apply(FailableCache.java:35)
at org.elasticsearch.common.inject.internal.MapMaker$StrategyImpl.compute(MapMaker.java:549)
... 27 more
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.store.Lock
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 41 more

from this i came to know that there is problem in Maven Repositry,but i checked the maven,i din't find nay issues.

Was i am in the correct path to get the communication from java to elasticsearch.do i need to set any classpath or path related to Elasticsearch.<

...

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/4a7553a3-276e-4b4a-b142-cb8d849569df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.