0

I am trying to use spring-elastic search template for the queries.

I am getting below exception when i try to execute queries through elastic search template.

SEVERE: Servlet.service() for servlet [home] in context with path [/grid-admin-service] threw exception [Handler processing failed; nested exception is java.lang.NoSuchMethodError: org.apache.commons.collections.CollectionUtils.isNotEmpty(Ljava/util/Collection;)Z] with root cause
java.lang.NoSuchMethodError: org.apache.commons.collections.CollectionUtils.isNotEmpty(Ljava/util/Collection;)Z
at org.springframework.data.elasticsearch.core.ElasticsearchTemplate.doSearch(ElasticsearchTemplate.java:589)

There is no isNotEmpty method in CollectionUtils class.

How to overcome this issue?

Arnab Nandy
  • 6,472
  • 5
  • 44
  • 50
Vipin
  • 781
  • 1
  • 10
  • 19

1 Answers1

0

There was a version mismatch of the commons collections jar. I fixed it by giving the latest dependency in pom.xml

Vipin
  • 781
  • 1
  • 10
  • 19