question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NoSuchMethodError with Jedis 3.4.1 on Java 8

See original GitHub issue

I started to see these errors after upgrading a Java 8 (complied and run) application from Jedis 3.3.0 to 3.4.1. Googling the issue yields several sources that say it might be related to Buffer and ByteBuffer when switching from Java 8 to 11, but I haven’t verified that (Stackoverflow).

Is it maybe possible Jedis was compiled with JDK 8 before, but is now on a higher version?

Expected behavior

No error when getting a resource from a ShardedJedisPool

Actual behavior

java.lang.NoSuchMethodError: java.nio.ByteBuffer.rewind()Ljava/nio/ByteBuffer;
	at redis.clients.jedis.util.MurmurHash.hash64A(MurmurHash.java:126)
	at redis.clients.jedis.util.MurmurHash.hash64A(MurmurHash.java:94)
	at redis.clients.jedis.util.MurmurHash.hash(MurmurHash.java:141)
	at redis.clients.jedis.util.MurmurHash.hash(MurmurHash.java:146)
	at redis.clients.jedis.util.Sharded.initialize(Sharded.java:58)
	at redis.clients.jedis.util.Sharded.<init>(Sharded.java:48)
	at redis.clients.jedis.BinaryShardedJedis.<init>(BinaryShardedJedis.java:37)
	at redis.clients.jedis.ShardedJedis.<init>(ShardedJedis.java:36)
	at redis.clients.jedis.ShardedJedisPool$ShardedJedisFactory.makeObject(ShardedJedisPool.java:72)
	at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:918)
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:431)
	at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:356)
	at redis.clients.jedis.util.Pool.getResource(Pool.java:50)
	at redis.clients.jedis.ShardedJedisPool.getResource(ShardedJedisPool.java:36)

Redis / Jedis Configuration

Jedis version: 3.4.1

Redis version: 4.0.14

Java version: 8

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

1reaction
sazzad16commented, Jan 23, 2021

@YNedderhoff Jedis 3.5.1 is released officially. Thank you for your contribution.

1reaction
sazzad16commented, Jan 22, 2021

@YNedderhoff Check https://github.com/redis/jedis#snapshots The repositories is at the same level of the dependencies. And put 3.5.1-SNAPSHOT as version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix a NoSuchMethodError? - java - Stack Overflow
If the exception appears when calling a method on objects instantiated by classes you made, then your build process seems to be faulty....
Read more >
java.lang.NoSuchMethodError: org.springframework.boot ...
fail to start my Spring boot 2.0.0 Project here is my error log [main] ERROR org.springframework.boot.SpringApplication - Application run ...
Read more >
How to Fix java.lang.NoSuchMethodError in Java - Rollbar
A java.lang.NoSuchMethodError is a runtime error which occurs when a method is called that exists at compile time, but does not exist at ......
Read more >
Google Groups
NoSuchMethodError : redis.clients.jedis. ... Hi, I'm getting the following Exception when trying to run a java webapp on an ec2 instance.
Read more >
NoSuchMethodError in Java - Baeldung
As the name suggests, the NoSuchMethodError occurs when a particular method is not found. This method can either be an instance method or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found