NoSuchMethodError exception with spring-data-redis

Sreekanth picture Sreekanth · Oct 25, 2017 · Viewed 8.5k times · Source

Started getting the following exception, after upgrading release train to Kay-RELEASE of spring data.

Caused by: java.lang.NoSuchMethodError: org.springframework.util.Assert.isTrue(ZLjava/util/function/Supplier;)V
at org.springframework.data.redis.connection.RedisStandaloneConfiguration.<init>(RedisStandaloneConfiguration.java:61)
at org.egov.infra.config.redis.RedisServerConfiguration.redisConnectionFactory(RedisServerConfiguration.java:86)
at org.egov.infra.config.redis.RedisServerConfiguration$$EnhancerBySpringCGLIB$$f89e20ba.CGLIB$redisConnectionFactory$1(<generated>)
at org.egov.infra.config.redis.RedisServerConfiguration$$EnhancerBySpringCGLIB$$f89e20ba$$FastClassBySpringCGLIB$$1ac62136.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)

Have double checked all the jars dependency and neither there is duplicate nor different versions of jars exist. I'm using spring 4.3.12.RELEASE

Answer

Sreekanth picture Sreekanth · Oct 30, 2017

spring-data Kay-RELEASE (aka 2.0.0) doesn't work with Spring v4.3.X <. It only works with springframework v 5.0.0 >.