Home  >  Forum  >  Spring
Post New Query

IncompatibleClassChangeError: class org.springframework.data.redis.connection. lettuce.BytesRedisCodec has interface com.lambdaworks.redis.codec


joined on
March 27,2014
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 org.springframework.data.redis.connection.lettuce.BytesRedisCodec 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(ClassLoader.java:760) ~[na:1.8.0]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.8.0]
at java.net.URLClassLoader.defineClass(URLClassLoader.java:455) ~[na:1.8.0]
at java.net.URLClassLoader.access$100(URLClassLoader.java:73) ~[na:1.8.0]
at java.net.URLClassLoader$1.run(URLClassLoader.java:367) ~[na:1.8.0]
at java.net.URLClassLoader$1.run(URLClassLoader.java:361) ~[na:1.8.0]
at java.security.AccessController.doPrivileged(Native Method) ~[na:1.8.0]
at java.net.URLClassLoader.findClass(URLClassLoader.java:360) ~[na:1.8.0]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) ~[na:1.8.0]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0]
at org.springframework.data.redis.connection.lettuce.LettuceConnection.<clinit>(LettuceConnection.java:123) ~[spring-data-redis-1.7.6.RELEASE.jar:na]
at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory.getConnection(LettuceConnectionFactory.java:190) ~[spring-data-redis-

1.7.6.RELEASE.jar:na]
at org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration

$EnableRedisKeyspaceNotificationsInitializer.afterPropertiesSet(RedisHttpSessionConfiguration.java:249) ~[spring-session-1.3.1.BUILD-SNAPSHOT.jar:na]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1648) ~[spring-

beans-4.3.5.RELEASE.jar:4.3.5.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1585) ~[spring-beans-

4.3.5.RELEASE.jar:4.3.5.RELEASE]
joined on
November 09,2013
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.

<dependency>
     <groupId>biz.paluch.redis</groupId>
     <artifactId>lettuce</artifactId>
     <version>3.5.0.Final</version>
</dependency>   

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

Write Answer








Copyright ©2017 concretepage.com, all rights reserved |Privacy Policy | Contact Us