After upgrade from 19.6 to 90.5 we get this: java.lang.NoSuchMethodError: org.elasticsearch.client.Client.prepareBulk()

Is prepareBulk() deprecated?

Here is the exception report during integration testing:

Handler processing failed; nested exception is java.lang.NoSuchMethodError:
org.elasticsearch.client.Client.prepareBulk()Lorg/elasticsearch/action/bulk/BulkRequestBuilder;
org.springframework.web.servlet.DispatcherServlet.doDispatch(
DispatcherServlet.java:972)
org.springframework.web.servlet.DispatcherServlet.doService(
DispatcherServlet.java:852)
org.springframework.web.servlet.FrameworkServlet.processRequest(
FrameworkServlet.java:882)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet
.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

java.lang.NoSuchMethodError: 
org.elasticsearch.client.Client.prepareBulk()Lorg/elasticsearch/action/bulk/
BulkRequestBuilder;
    org.kwince.contribs.osem.dao.OsemManagerImpl.mapping(OsemManagerImpl.
java:674)
    org.kwince.contribs.osem.dao.OsemManagerImpl.save(OsemManagerImpl.java:
167)
    org.kwince.contribs.osem.dao.OsemManagerImpl.save(OsemManagerImpl.java:
158)
    com.kwince.crud.CrudController.create(Unknown Source)
    com.kwince.rest.JsonRpcController.doRpc(Unknown Source)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
    java.lang.reflect.Method.invoke(Method.java:597)
    org.springframework.web.method.support.InvocableHandlerMethod.invoke(
InvocableHandlerMethod.java:213)
    org.springframework.web.method.support.InvocableHandlerMethod.
invokeForRequest(InvocableHandlerMethod.java:126)
    org.springframework.web.servlet.mvc.method.annotation.
ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.
java:96)
    org.springframework.web.servlet.mvc.method.annotation.
RequestMappingHandlerAdapter.invokeHandlerMethod(
RequestMappingHandlerAdapter.java:617)
    org.springframework.web.servlet.mvc.method.annotation.
RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.
java:578)
    org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.
handle(AbstractHandlerMethodAdapter.java:80)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(
DispatcherServlet.java:923)
    org.springframework.web.servlet.DispatcherServlet.doService(
DispatcherServlet.java:852)
    org.springframework.web.servlet.FrameworkServlet.processRequest(
FrameworkServlet.java:882)
    org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet
.java:789)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

I looked in the code for ESearch 90.5 using grep, andn could not find where
the method was anywhere but in the:

./src/main/java/org/elasticsearch/client/Client.java (An Interface)

Here is what I get when I search the 90.5 code for an instantiated version
of 'prepareBulk', nothing!
./src/main/java/org/elasticsearch/client/support/AbstractClient.java:
public BulkRequestBuilder prepareBulk() {
./src/main/java/org/elasticsearch/client/Client.java: BulkRequestBuilderprepareBulk
();
./src/main/java/org/elasticsearch/indices/ttl/IndicesTTLService.java:
BulkRequestBuilder bulkRequest = client.prepareBulk();
./src/main/java/org/elasticsearch/indices/ttl/IndicesTTLService.java:
bulkRequest = client.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/stress/SingleThreadBulkStress.
java: BulkRequestBuilder request = client1.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/search/facet/
QueryFilterFacetSearchBenchmark.java: BulkRequestBuilderrequest
= client.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/search/facet/
HistogramFacetSearchBenchmark.java: BulkRequestBuilderrequest
= client.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/search/facet/
TermsFacetSearchBenchmark.java: BulkRequestBuilder request =client
.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/search/child/
ChildSearchShortCircuitBenchmark.java: BulkRequestBuilderrequest
= client.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/search/child/
ChildSearchAndIndexingBenchmark.java: BulkRequestBuilderrequest
= client.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/search/child/
ChildSearchBenchmark.java: BulkRequestBuilder request =client
.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/search/SuggestSearchBenchMark.
java: BulkRequestBuilder request = client.prepareBulk();
./src/test/java/org/elasticsearch/benchmark/search/nested/
NestedSearchBenchMark.java: BulkRequestBuilder request =client
.prepareBulk();
./src/test/java/org/elasticsearch/update/UpdateTests.java:
client().prepareBulk().add(updateRequestBuilder).execute().
actionGet();
./src/test/java/org/elasticsearch/versioning/SimpleVersioningTests.java:
BulkResponse bulkResponse = client().prepareBulk().add(client().
prepareIndex("test", "type", "1").setSource("field1", "value1_1")).execute
().actionGet();
./src/test/java/org/elasticsearch/document/BulkTests.java:
BulkResponse bulkResponse = client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
bulkResponse = client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
bulkResponse = client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
BulkResponse bulkResponse = run(client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
bulkResponse = run(client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
bulkResponse = run(client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
bulkResponse = run(client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
BulkResponse bulkResponse = client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
bulkResponse = client().prepareBulk()
./src/test/java/org/elasticsearch/document/BulkTests.java:
BulkRequestBuilder builder = client().prepareBulk();
./src/test/java/org/elasticsearch/document/BulkTests.java: builder =client
().prepareBulk();
./src/test/java/org/elasticsearch/document/BulkTests.java: builder =client
().prepareBulk();
./src/test/java/org/elasticsearch/document/BulkTests.java: builder =client
().prepareBulk();
./src/test/java/org/elasticsearch/document/BulkTests.java: builder =client
().prepareBulk();
./src/test/java/org/elasticsearch/document/BulkTests.java:
BulkRequestBuilder builder = client().prepareBulk();
./src/test/java/org/elasticsearch/document/BulkTests.java:
BulkRequestBuilder builder = client().prepareBulk();
./src/test/java/org/elasticsearch/document/BulkTests.java:
BulkRequestBuilder requestBuilder = client().prepareBulk();
./src/test/java/org/elasticsearch/document/DocumentActionsTests.java:
BulkResponse bulkResponse = client().prepareBulk()
./src/test/java/org/elasticsearch/test/stress/fullrestart/
FullRestartStressTest.java: BulkRequestBuilder bulk = client.
client().prepareBulk();
./src/test/java/org/elasticsearch/test/stress/indexing/
BulkIndexingStressTest.java: BulkRequestBuilder bulkRequest =client
.prepareBulk();
./src/test/java/org/elasticsearch/routing/AliasRoutingTests.java:
client().prepareBulk().add(Requests.deleteRequest("test").type("type1").id(
"1")).execute().actionGet();
./src/test/java/org/elasticsearch/routing/SimpleRoutingTests.java:
client().prepareBulk().add(Requests.deleteRequest("test").type("type1").id(
"1")).execute().actionGet();
./src/test/java/org/elasticsearch/routing/SimpleRoutingTests.java:
client().prepareBulk().add(
./src/test/java/org/elasticsearch/recovery/RelocationTests.java:
BulkRequestBuilder bulkRequest = perThreadClient.
prepareBulk();
./src/test/java/org/elasticsearch/recovery/RelocationTests.java:
BulkRequestBuilder bulkRequest = perThreadClient.
prepareBulk();
./src/test/java/org/elasticsearch/indexing/IndexActionTests.java:
BulkResponse bulkResponse = client().prepareBulk().add(client().prepareIndex
("test", "type", "1").setSource("field1", "value1_1")).execute().actionGet
();
./src/test/java/org/elasticsearch/search/geo/GeoFilterTests.java:
BulkResponse bulk = client().prepareBulk().add(bulkAction, 0, bulkAction.
length, false, null, null).execute().actionGet();

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Additional Infromation:

This is the tomcat logs. I did wade through the code and found the
implementation of prepareBulk(), it just returns (this). From any client
that instantiates the abstract class.

The tomcat logs show:
org.elasticsearch.client.transport.NoNodeAvailableException: No node
available
at org.elasticsearch.client.transport.TransportClientNodesService.
execute(TransportClientNodesService.java:205)
at org.elasticsearch.client.transport.support.
InternalTransportClusterAdminClient.execute(
InternalTransportClusterAdminClient.java:82)
at org.elasticsearch.client.support.AbstractClusterAdminClient.health(
AbstractClusterAdminClient.java:75)
at org.elasticsearch.action.admin.cluster.health.
ClusterHealthRequestBuilder.doExecute(ClusterHealthRequestBuilder.java:94)
at org.elasticsearch.action.admin.cluster.support.
BaseClusterRequestBuilder.execute(BaseClusterRequestBuilder.java:55)
at org.elasticsearch.action.admin.cluster.support.
BaseClusterRequestBuilder.execute(BaseClusterRequestBuilder.java:49)
at org.kwince.contribs.osem.dao.OsemManagerImpl.ensureIndex(
OsemManagerImpl.java:839)
at org.kwince.contribs.osem.dao.OsemManagerImpl.mapping(OsemManagerImpl.
java:677)
at org.kwince.contribs.osem.dao.OsemManagerImpl.save(OsemManagerImpl.
java:167)
at org.kwince.contribs.osem.dao.OsemManagerImpl.save(OsemManagerImpl.
java:158)
at com.kwince.crud.CrudController.create(Unknown Source)
at com.kwince.rest.JsonRestController.create(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.web.method.support.InvocableHandlerMethod.invoke(
InvocableHandlerMethod.java:213)
at org.springframework.web.method.support.InvocableHandlerMethod.
invokeForRequest(InvocableHandlerMethod.java:126)
at org.springframework.web.servlet.mvc.method.annotation.
ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.
java:96)
at org.springframework.web.servlet.mvc.method.annotation.
RequestMappingHandlerAdapter.invokeHandlerMethod(
RequestMappingHandlerAdapter.java:617)
at org.springframework.web.servlet.mvc.method.annotation.
RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.
java:578)
at org.springframework.web.servlet.mvc.method.
AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(
DispatcherServlet.java:923)
at org.springframework.web.servlet.DispatcherServlet.doService(
DispatcherServlet.java:852)
at org.springframework.web.servlet.FrameworkServlet.processRequest(
FrameworkServlet.java:882)
at org.springframework.web.servlet.FrameworkServlet.doPost(
FrameworkServlet.java:789)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(
StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(
StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.
java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.
java:98)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
927)
at org.apache.catalina.core.StandardEngineValve.invoke(
StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.
java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(
AbstractHttp11Processor.java:987)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
AbstractProtocol.java:579)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(
JIoEndpoint.java:309)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:615)
at java.lang.Thread.run(Thread.java:679)

Which is weired because I have a running ESearch node on my machine, andthe tests
for 'osem' are run using the exact same settings.
osem.clusterName = elasticsearch
osem.clientTransportSniff = true
osem.host = 127.0.0.1
osem.port = 9300
(these get passed when creating a client)

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

The method did not change:

https://github.com/elasticsearch/elasticsearch/blame/master/src/main/java/org/elasticsearch/client/Client.java#L245

Because you can't continue to use 0.19 client when connecting to 0.90,
check your class path if you have any old ES jars left.

Jörg

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

WAY late responding to this, but putting it in here for archival reasons. I
basically abandoned my own paid for library and switched to a language I
was more familiar with, PHP. I think that PHP/Symfony/Doctrine is a more
complete framework than Java/Spring. Or let's say, more complete out of the
box. There's an Elasticsearch/Doctrine connector, and a complete security
model in Symfony that doesn't call permissions roles and roles permissions
(or whatever the spring security DOES name backwards). In the 3 years I
worked with Java, I never saw a security model that worked the way I wanted
it to do.

Elasticsearch-wise, I wasn't prepared to keep upgrading libraries I paid
for, paying more money, to keep up with Java versions and ES versions. So I
dropped back to PHP and using the JSON Api for ES.

On Saturday, October 26, 2013 at 12:51:12 PM UTC-7, Jörg Prante wrote:

The method did not change:

https://github.com/elasticsearch/elasticsearch/blame/master/src/main/java/org/elasticsearch/client/Client.java#L245

Because you can't continue to use 0.19 client when connecting to 0.90,
check your class path if you have any old ES jars left.

Jörg

--
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/feea089b-5c72-48b3-80d6-e873c2502ed7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.