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

java.lang.NoClassDefFoundError: redis/clients/jedis/Queable #2758

Closed
nstrong-scw opened this issue Oct 30, 2023 · 3 comments
Closed

java.lang.NoClassDefFoundError: redis/clients/jedis/Queable #2758

nstrong-scw opened this issue Oct 30, 2023 · 3 comments
Labels
status: declined A suggestion or change that we don't feel we should currently apply

Comments

@nstrong-scw
Copy link

This is a "no duh" type issue but I'm leaving it here for future searches:

When attempting to connect to Redis using Spring Boot 3.1.5 + SBR 3.1.5 + jedis 5.x, the connection fails with a NoClassDefFound error looking for "redis/clients/jedis/Queable"

Solution: downgrade jedis to 4.3.2

My own searching guided me towards a version conflict, but most references to this error talk about a much older version of SBR and Jedis. I figured out what version of jedis to use by browsing the source to the 3.1.5 tag and looking at the pom.xml.

Again -- nothing here that is super surprising, but hopefully I save some people some time. Backporting the jedis 5.x work to the 3.1.x release would be neat though.

@nstrong-scw
Copy link
Author

see also: to redis/jedis#3530

copy/pasting their stacktrace here for searchability:

java.lang.NoClassDefFoundError: redis/clients/jedis/Queable
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:463)
at org.springframework.data.redis.core.RedisConnectionUtils.fetchConnection(RedisConnectionUtils.java:193)
at org.springframework.data.redis.core.RedisConnectionUtils.doGetConnection(RedisConnectionUtils.java:144)
at org.springframework.data.redis.core.RedisConnectionUtils.getConnection(RedisConnectionUtils.java:105)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:393)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:373)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:97)
at org.springframework.data.redis.core.DefaultValueOperations.set(DefaultValueOperations.java:237)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Oct 30, 2023
@mp911de
Copy link
Member

mp911de commented Nov 1, 2023

Thanks for reaching out. The Jedis 5 upgrade required some effort on our side (see #2612), additionally, Jedis moved a few classes around. They also removed the Queable class by merging it into TransactionBase and Pipeline. These binary incompatibilities cause the upgrade problem in the first place. To make it work, the older branch would have to compile against a new major version (see also our dependency upgrade policy).

As we do not intend to backport the changes, I'm closing the ticket.

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Nov 1, 2023
@mp911de mp911de added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 1, 2023
@nstrong-scw
Copy link
Author

Completely reasonable! (really 99% of the impetus was get this out in the googlesphere to help anyone else who hits the same issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

No branches or pull requests

3 participants