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.

JMH BITMAP_TYPES=ROARING_ONLY fail with java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer

See original GitHub issue

Starting with commit https://github.com/RoaringBitmap/RoaringBitmap/commit/3e49972c6f4a465cbb945d5366b5796441619a79

our JMH unit tests are failing…

One can browse the error message on travis…

https://travis-ci.org/RoaringBitmap/RoaringBitmap/jobs/187494350

The error is not comprehensible… However, we can verify that it is not caused by travis…

Indeed, running tests manually with

mvn -f ./jmh/pom.xml test -DBITMAP_TYPES=ROARING_ONLY

fails with the same incomprehensible errors… there is no debugging information that I can find…

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.roaringbitmap.realdata.RealDataBenchmarkWideOrNaiveTest
Tests run: 48, Failures: 0, Errors: 24, Skipped: 0, Time elapsed: 18.088 sec <<< FAILURE! - in org.roaringbitmap.realdata.RealDataBenchmarkWideOrNaiveTest
test[dataset=census-income, type=roaring, immutable=true](org.roaringbitmap.realdata.RealDataBenchmarkWideOrNaiveTest)  Time elapsed: 0.049 sec  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
test[dataset=census-income, type=roaring_with_run, immutable=true](org.roaringbitmap.realdata.RealDataBenchmarkWideOrNaiveTest)  Time elapsed: 0.029 sec  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
test[dataset=census1881, type=roaring, immutable=true](org.roaringbitmap.realdata.RealDataBenchmarkWideOrNaiveTest)  Time elapsed: 0.003 sec  <<< ERROR!
java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
test[dataset=census1881, type=roaring_with_run, immutable=true](org.roaringbitmap.realdata.RealDataBenchmarkWideOrNaiveTest)  Time elapsed: 0.002 sec  <<< ERROR!

As far as I can tell, the missing method, java.nio.ByteBuffer.limit, has been part of Java since Java 1.4, a really long time ago.

There is nothing in the above commit that should trigger any of this.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gssiyankaicommented, Dec 29, 2016

I think it has something to do with maven dependencies. I cannot analyze the issue right now because I don’t have my laptop with me but I’ll have a look soon.

0reactions
lemirecommented, Dec 30, 2016

@gssiyankai Great work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issue - GitHub
Running a Jetty compiled with JDK 9+ with release 8 in a JDK 8 JVM will produce a NoSuchMethodError . The solution is...
Read more >
Ask Question - Stack Overflow
Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.flip()Ljava/nio/ByteBuffer · 1. Why can't you use the same jdk of ...
Read more >
ByteBuffer and the Dreaded NoSuchMethodError
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; at io.debezium.connector.postgresql.connection.
Read more >
Red Hat Issue Tracker
Bug - A problem which impairs or prevents the functions of the product. WFCORE-5902 UT005090: Unexpected failure: java.lang.NoSuchMethodError: java.nio.
Read more >
KTOR-1398 - YouTrack
java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer when Ktor is built with JDK 9+. Depends on 1 Similar to 1.
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