1 year ago
#378935
Rhodless
ClassNotFoundException exception with redisson
I'm trying to use a RSet to store my ranks, but I have a ClassNotFoundException while the class exists (I even decompiled and the class is here). In my opinion Redisson cannot store a custom object class? Here is my code:
public class RedisProvider {
private final RSet<Rank> ranks;
private final RedissonClient client;
public RedisProvider() {
this.client = Redisson.create();
this.ranks = client.getSet("ranks");
Rank rank = new Rank("default", 0, "&7", "&7");
addRank(rank);
}
public Set<Rank> getRanks(){
return ranks.readAll();
}
public void addRank(Rank rank) {
ranks.add(rank);
}
}
Error:
[17:51:39 ERROR]: Unable to decode data. channel: [id: 0xb12f3447,
L:/127.0.0.1:58768 - R:127.0.0.1/127.0.0.1:6379], reply:
ReplayingDecoderByteBuf(ridx=146, widx=146), command: (SSCAN), promise:
java.util.concurrent.CompletableFuture@4e7fd89e[Not completed, 1
dependents], params: [ranks, 0, COUNT, 10] java.io.IOException:
java.lang.ClassNotFoundException: fr.rhodless.test.Rank
I checked if the "Rank" class existed and it exists.
java
redis
redisson
0 Answers
Your Answer