Exception java.lang.NoClassDefFoundError: com/lambdaworks/redis/RedisURI

94 views
Skip to first unread message

Sampath Narayan -

unread,
Sep 17, 2020, 10:40:53 PM9/17/20
to lettuce-redis-client-users
I'm getting the above exception when I try to create an instance of RedisURI using the following scala code.


import com.lambdaworks.redis.api.async.RedisAsyncCommands
import com.lambdaworks.redis.RedisAsyncCommandsImpl
import com.lambdaworks.redis.RedisClient
import com.lambdaworks.redis.RedisURI
import com.lambdaworks.redis.api.StatefulRedisConnection
import com.lambdaworks.redis.cluster.RedisClusterClient
import com.lambdaworks.redis.cluster.api.StatefulRedisClusterConnection
import com.lambdaworks.redis.cluster.api.sync.RedisAdvancedClusterCommands

<< snip >>
        var redisUri:RedisURI = new RedisURI()

Dependencies are configured as below in build.sbt
lazy val redisDependency = Seq(
  "biz.paluch.redis" % "lettuce" % "4.5.0.Final" % "provided",
  "com.google.guava" % "guava" % "18.0",
  "com.typesafe" % "config" % "1.3.1"
)

Tried using 4.3.0.Final for lettuce dependency. Got the same exception. Where can we find the correct lettuce version for using the RedisURI and other classes? Please help.

Thanks
Sampath

Sampath Narayan -

unread,
Sep 17, 2020, 11:05:23 PM9/17/20
to lettuce-redis-client-users
some of the relevant run time logs given below.
java.lang.NoClassDefFoundError: com/lambdaworks/redis/RedisURI
<<snip>>
        at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3542)
        at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2323)
        at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2286)
        at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
        at com.google.common.cache.LocalCache.get(LocalCache.java:3953)
        at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3957)
        at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4875)
<<snip>>
        at scala.collection.immutable.List.foreach(List.scala:381)
        at scala.collection.generic.TraversableForwarder$class.foreach(TraversableForwarder.scala:35)
        at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:45)
<<snip>>
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:527)
        at akka.actor.ActorCell.invoke(ActorCell.scala:496)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
        at akka.dispatch.Mailbox.run(Mailbox.scala:224)
        at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
        at akka.dispatch.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
        at akka.dispatch.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
        at akka.dispatch.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
        at akka.dispatch.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.lang.ClassNotFoundException: com.lambdaworks.redis.RedisURI
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
        ... 32 common frames omitted
Reply all
Reply to author
Forward
0 new messages