Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.redisson.spring.data.connection.RedissonConnection at org.redisson.spring.data.connection.RedissonConnectionFactory.getConnection(RedissonConnectionFactory.java:113) at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193) at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144) at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:211) at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:191) at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97) at org.springframework.data.redis.core.DefaultHashOperations.get(DefaultHashOperations.java:55) at com.million.mes.basic.commonredis.server.RedisService.getCacheMapValue(RedisService.java:231) at com.million.mes.basic.dbapi.service.DataSourceService.detail(DataSourceService.java:96) at com.million.mes.basic.dbapi.service.DataSourceService$$FastClassBySpringCGLIB$$f8f33523.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at com.baomidou.dynamic.datasource.aop.DynamicDataSourceAnnotationInterceptor.invoke(DynamicDataSourceAnnotationInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763) at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)
时间: 2023-08-20 10:44:12 浏览: 487
java.lang.NoClassDefFoundError
这个错误通常是由于缺少类定义导致的。在这个特定的堆栈跟踪中,错误是由于找不到 org.redisson.spring.data.connection.RedissonConnection 类的定义而引起的。这个类可能没有正确地加载,或者它的依赖项没有正确地加载。您可以检查一下是否正确引入了 Redisson 相关的依赖。如果依赖已经正确引入,您可以尝试清理和重新构建项目来解决该问题。
阅读全文