Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NullPointerException while caching collection - Rset #5604

Closed
navinvasu opened this issue Feb 1, 2024 · 4 comments
Closed

NullPointerException while caching collection - Rset #5604

navinvasu opened this issue Feb 1, 2024 · 4 comments

Comments

@navinvasu
Copy link

Expected behavior
No errors or Null pointer exception when Caching RSet. Collection of class-objects are saved to cache.

Actual behavior
Inconsistently throws NullPointer exception.
java.lang.NullPointerException: null at o.redisson.command.RedisExecutor.handleError(RedisExecutor.java:602) at o.redisson.command.RedisExecutor.execute(RedisExecutor.java:202) at o.r.command.CommandAsyncService.async(CommandAsyncService.java:564) at o.r.command.CommandAsyncService.writeAsync(CommandAsyncService.java:522) at org.redisson.RedissonSet.addAllAsync(RedissonSet.java:317) at org.redisson.RedissonSet.addAll(RedissonSet.java:305)

Steps to reproduce or test case
val cacheRSet = redissonClient.getSet(key, TypedJsonJacksonCodec(CacheRecord::class.java, objectMapper))
cacheRSet.addAll(listOf(Object))
cacheRSet.expire(cacheTtl)

Redis version
ElastiCache engine version 7.1.0

Redisson version
3.26.0

Redisson configuration
useClusterServers() timeout = 30000 isCheckLockSyncedSlaves = false

@mrniko
Copy link
Member

mrniko commented Feb 15, 2024

Unable to reproduce. Below is the test

        RSet<String> cacheRSet = redisson.getSet("key", new TypedJsonJacksonCodec(String.class, new ObjectMapper()));
        cacheRSet.addAll(Arrays.asList("1", "2", "3"));
        cacheRSet.expire(Duration.ofSeconds(1));

@mrniko mrniko added this to the 3.27.0 milestone Feb 15, 2024
@mrniko
Copy link
Member

mrniko commented Feb 19, 2024

Is there any update?

@mrniko mrniko modified the milestones: 3.27.0, 3.27.1 Feb 20, 2024
@navinvasu
Copy link
Author

@mrniko the error occurs Inconsistently. Would be difficult to reproduce.
Just an observation, the data type used was a java class vs the string used in the above example. Not sure if it has any impact on the way the redisson client reads the data and throws null pointer ?

@mrniko
Copy link
Member

mrniko commented Feb 21, 2024

Fixed in #5641

@mrniko mrniko closed this as completed Feb 21, 2024
@mrniko mrniko removed this from the 3.27.1 milestone Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants