为了账号安全,请及时绑定邮箱和手机立即绑定

redis配置不成功,报错java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig

https://img1.sycdn.imooc.com//5c10ef270001b16710210391.jpg


Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [redis.clients.jedis.JedisPool] for bean with name 'jedisPool' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring-redis.xml]; nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPool

Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [redis.clients.jedis.JedisPoolConfig] for bean with name 'jedisPoolConfig' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring-redis.xml]; nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'advisor' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/springmvc.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring.xml]: Cannot resolve reference to bean 'realm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'realm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [redis.clients.jedis.JedisPool] for bean with name 'jedisPool' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring-redis.xml]; nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPool

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring.xml]: Cannot resolve reference to bean 'realm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'realm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [redis.clients.jedis.JedisPool] for bean with name 'jedisPool' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring-redis.xml]; nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPool

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'realm': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [redis.clients.jedis.JedisPool] for bean with name 'jedisPool' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring-redis.xml]; nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPool

Caused by: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [redis.clients.jedis.JedisPool] for bean with name 'jedisPool' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring-redis.xml]; nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPool

Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.JedisPool


Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.JedisPool

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1109)

at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)

at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:394)

at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1397)

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1344)

... 68 more

Related cause:

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [redis.clients.jedis.JedisPoolConfig] for bean with name 'jedisPoolConfig' defined in URL [file:/D:/practice/shirostudy/classes/artifacts/shiro_web_war_exploded2/WEB-INF/classes/spring/spring-redis.xml]; nested exception is java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1352)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:628)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:597)

at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1445)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:445)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:415)

at org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:220)

at org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:73)

at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:101)

at org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:103)

at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:248)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:988)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:959)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:472)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:240)

at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:687)

Caused by: java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1275)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1109)

at org.springframework.util.ClassUtils.forName(ClassUtils.java:250)

at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:394)

at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1397)

at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1344)

... 68 more


正在回答

2 回答

已解决,是tomcat配置的问题。删掉原来的配置重新配置一边就好使了。

0 回复 有任何疑惑可以回复我~
#1

不老八戒

tomcat重新配什么意思?
2019-09-27 回复 有任何疑惑可以回复我~

有没有出现相同问题的?您是如何解决的?请教大神如何解决。

0 回复 有任何疑惑可以回复我~
#1

慕后端5411519

<!-- SpringBoot2.0中,默认赋予Lettuce依赖关系,要使用Jedis配置,需排除Lettuce依赖关系 --> <exclusions> <exclusion> <groupId>io.lettuce</groupId> <artifactId>lettuce-core</artifactId> </exclusion> </exclusions>
2020-03-31 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

redis配置不成功,报错java.lang.ClassNotFoundException: redis.clients.jedis.JedisPoolConfig

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信