IncompatibleClassChangeError: class lettuce.BytesRedisCodec has interface com.lambdaworks.redis.codec

Asked on January 27, 2017
I am using Redis with Spring. When I start server, error occurred as follows.

Caused by: java.lang.IncompatibleClassChangeError: class has interface 

com.lambdaworks.redis.codec.RedisCodec as super class
at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0]
at java.lang.ClassLoader.defineClass( ~[na:1.8.0]
at ~[na:1.8.0]
at ~[na:1.8.0]
at$100( ~[na:1.8.0]
at$ ~[na:1.8.0]
at$ ~[na:1.8.0]
at Method) ~[na:1.8.0]
at ~[na:1.8.0]
at java.lang.ClassLoader.loadClass( ~[na:1.8.0]
at sun.misc.Launcher$AppClassLoader.loadClass( ~[na:1.8.0]
at java.lang.ClassLoader.loadClass( ~[na:1.8.0]
at<clinit>( ~[spring-data-redis-1.7.6.RELEASE.jar:na]
at ~[spring-data-redis-


$EnableRedisKeyspaceNotificationsInitializer.afterPropertiesSet( ~[spring-session-1.3.1.BUILD-SNAPSHOT.jar:na]
at ~[spring-

at ~[spring-beans-


Replied on January 28, 2017
You are missing lettuce dependency. Configure it in your maven or gradle. If you are using maven then add following dependency.


If you are using spring-data-redis with version 1.7.6,  then lettuce should be  3.5.0.Final version.

Write Answer

©2023 | Privacy Policy | Contact Us