Problem with Lettuce client + Maven for connect to Redis

1,318 views
Skip to first unread message

Gian Piero Marcacci

unread,
Sep 29, 2015, 3:26:18 AM9/29/15
to Redis DB
Hi . . . I am using lettuce with maven and I got this error:

<EndpointMethodHandler><invoke> com/lambdaworks/com/google/common/cache/CacheBuilder
java.lang.NoClassDefFoundError: com/lambdaworks/com/google/common/cache/CacheBuilder
at com.lambdaworks.redis.FutureSyncInvocationHandler.<init>(FutureSyncInvocationHandler.java:37)
at com.lambdaworks.redis.AbstractRedisClient.syncHandler(AbstractRedisClient.java:312)
at com.lambdaworks.redis.RedisClient.connect(RedisClient.java:272)
at com.lambdaworks.redis.RedisClient.connect(RedisClient.java:241)
at com.lambdaworks.redis.RedisClient.connect(RedisClient.java:227)

my code is so simple like this:

      RedisClient redisClient = new RedisClient("localhost");
      RedisConnection<String, String> connection = redisClient.connect();
      connection.set("key", "Hello, Redis!");

        connection.close();
        redisClient.shutdown();

and I included this in my pom.xml:

<dependency>
  <groupId>biz.paluch.redis</groupId>
  <artifactId>lettuce</artifactId>
  <version>x.y.z</version>
  <classifier>shaded</classifier>
  <exclusions>
    <exclusion>
      <groupId>io.netty</groupId>
      <artifactId>netty-common</artifactId>
    </exclusion>

    <exclusion>
      <groupId>io.netty</groupId>
      <artifactId>netty-transport</artifactId>
    </exclusion>

    <exclusion>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </exclusion>

    <exclusion>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-pool2</artifactId>
    </exclusion>
  </exclusions>
</dependency>


any suggestion ? Thanks !!!

Josiah Carlson

unread,
Oct 1, 2015, 1:48:16 AM10/1/15
to redi...@googlegroups.com
You would probably have better luck asking this question in the forum dedicated to your Redis client.

 - Josiah



--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
To post to this group, send email to redi...@googlegroups.com.
Visit this group at http://groups.google.com/group/redis-db.
For more options, visit https://groups.google.com/d/optout.

Mark Paluch

unread,
Oct 3, 2015, 1:30:12 PM10/3/15
to Redis DB
That's a bug in the shaded jar of 3.3.Final. It's fixed in 3.3.1.Final. If you're not required to use the shaded jar, use the regular version:

<dependency>
  <groupId>biz.paluch.redis</groupId>
  <artifactId>lettuce</artifactI
d>
  <version>3.3.1.Final</version>
</dependency>

HTH, Mark
Reply all
Reply to author
Forward
0 new messages