Application Failed to Start, because of Redis Dependency?

I am unable to start the application to do the JMeter tests. I have commented out the redis related stuff as had been mentioned in an earlier post here. I’m not sure how to proceed here - can someone help me out ?

This the error message it is throwing -

19:39:55.852 [restartedMain] WARN org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘redisTemplate’ defined in class path resource [org/springframework/boot/autoconfigure/data/redis/RedisAutoConfiguration.class]: Unsatisfied dependency expressed through method ‘redisTemplate’ parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘org.springframework.data.redis.connection.RedisConnectionFactory’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
19:39:56.167 [restartedMain] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter -


APPLICATION FAILED TO START


Description:

Parameter 0 of method redisTemplate in org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration required a bean of type ‘org.springframework.data.redis.connection.RedisConnectionFactory’ that could not be found.

The following candidates were found but could not be injected:
- Bean method ‘redisConnectionFactory’ in ‘JedisConnectionConfiguration’ not loaded because @ConditionalOnClass did not find required classes ‘org.apache.commons.pool2.impl.GenericObjectPool’, ‘redis.clients.jedis.Jedis’
- Bean method ‘redisConnectionFactory’ in ‘LettuceConnectionConfiguration’ not loaded because @ConditionalOnClass did not find required class ‘io.lettuce.core.RedisClient’

Action:

Consider revisiting the entries above or defining a bean of type ‘org.springframework.data.redis.connection.RedisConnectionFactory’ in your configuration.

Could you try using jedis version 2.10.2 instead of the latest one? I had a similar issue and this fixed it.

1 Like

How do I change the jedis version ?

Edit : I am still in the Milestone-1 - I haven’t implemented caching related stuff yet - so I don’t think jedis might be the problem

@awrko
there is a simpler step, just do
git checkout -f
it will basically discard every local changes from the last push, that will be equivalent to completing module 5, get your data from jmeter and then pull again.