Caused by: java.lang.NoClassDefFoundError: org/redisson/client/protocol/decoder/ListMultiDecoder2
at org.redisson.spring.data.connection.RedissonConnection.(RedissonConnection.java:1259) ~[redisson-spring-data-22-3.13.1.jar:3.13.1]
at org.redisson.spring.data.connection.RedissonConnectionFactory.getConnection(RedissonConnectionFactory.java:108) ~[redisson-spring-data-22-3.13.1.jar:3.13.1]
at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:132) ~[spring-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:95) ~[spring-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:82) ~[spring-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:211) ~[spring-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:184) ~[spring-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:95) ~[spring-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.data.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:236) ~[spring-data-redis-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at com.test.WebApplication.set(WebApplication.java:32) [classes/:na]
at com.test.WebApplication E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIBb6dda580.CGLIB$set 0 ( < g e n e r a t e d > )   [ c l a s s e s / : n a ] a t c o m . t e s t . W e b A p p l i c a t i o n 0(<generated>) ~[classes/:na] at com.test.WebApplication 0(<generated>) [classes/:na]atcom.test.WebApplication E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB b 6 d d a 580 b6dda580 b6dda580 F a s t C l a s s B y S p r i n g C G L I B FastClassBySpringCGLIB FastClassBySpringCGLIB 1 c b a f e a e . i n v o k e ( < g e n e r a t e d > )   [ c l a s s e s / : n a ] a t o r g . s p r i n g f r a m e w o r k . c g l i b . p r o x y . M e t h o d P r o x y . i n v o k e S u p e r ( M e t h o d P r o x y . j a v a : 244 )   [ s p r i n g − c o r e − 5.1.4. R E L E A S E . j a r : 5.1.4. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s E n h a n c e r 1cbafeae.invoke(<generated>) ~[classes/:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.1.4.RELEASE.jar:5.1.4.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer 1cbafeae.invoke(<generated>) [classes/:na]atorg.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) [springcore5.1.4.RELEASE.jar:5.1.4.RELEASE]atorg.springframework.context.annotation.ConfigurationClassEnhancerBeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
at com.test.WebApplication E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIBb6dda580.set() ~[classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_77]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_77]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_77]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_77]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
… 20 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.redisson.client.protocol.decoder.ListMultiDecoder2
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_77]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_77]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_77]
… 40 common frames omitted

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.redisson.api.RedissonClient]: Factory method ‘redisson’ threw exception; nested exception is java.lang.NullPointerException

解决办法:
1. 升级版本, 我从3.8.2升级到3.13.1
2. redisson-spring-boot-starter和redisson的依赖版本必须保持一致

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐