-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer when enabling topic metadata compression #11593
Comments
codelipenghui
added a commit
to codelipenghui/incubator-pulsar
that referenced
this issue
Aug 8, 2021
…/nio/ByteBuffer when enabling topic metadata compression Related to apache#11593. This PR is copy the bytes to the DirectBuf to get around the issue apache#11593.
This looks like a bug in aircompressor library. it's not specifying the release configuration for maven compiler plugin as described in https://www.morling.dev/blog/bytebuffer-and-the-dreaded-nosuchmethoderror/ . In Pulsar this was solved with #10343 . |
codelipenghui
added a commit
that referenced
this issue
Aug 9, 2021
…/nio/ByteBuffer when enabling topic metadata compression (#11594) ### Motivation Related to #11593. This PR is copying the bytes to the DirectBuf to get around issue #11593. The created issue airlift/aircompressor#133 for tracking fix from [aircompressor](https://github.com/airlift/aircompressor) ### Verifying this change Make the `ManagedLedgerCompressionTest` running on JDK8
LeBW
pushed a commit
to LeBW/pulsar
that referenced
this issue
Aug 9, 2021
…/nio/ByteBuffer when enabling topic metadata compression (apache#11594) ### Motivation Related to apache#11593. This PR is copying the bytes to the DirectBuf to get around issue apache#11593. The created issue airlift/aircompressor#133 for tracking fix from [aircompressor](https://github.com/airlift/aircompressor) ### Verifying this change Make the `ManagedLedgerCompressionTest` running on JDK8
hangc0276
pushed a commit
that referenced
this issue
Aug 12, 2021
…/nio/ByteBuffer when enabling topic metadata compression (#11594) ### Motivation Related to #11593. This PR is copying the bytes to the DirectBuf to get around issue #11593. The created issue airlift/aircompressor#133 for tracking fix from [aircompressor](https://github.com/airlift/aircompressor) ### Verifying this change Make the `ManagedLedgerCompressionTest` running on JDK8 (cherry picked from commit 53c7c13)
This was fixed in #11790 |
bharanic-dev
pushed a commit
to bharanic-dev/pulsar
that referenced
this issue
Mar 18, 2022
…/nio/ByteBuffer when enabling topic metadata compression (apache#11594) ### Motivation Related to apache#11593. This PR is copying the bytes to the DirectBuf to get around issue apache#11593. The created issue airlift/aircompressor#133 for tracking fix from [aircompressor](https://github.com/airlift/aircompressor) ### Verifying this change Make the `ManagedLedgerCompressionTest` running on JDK8
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
We have introduced managed ledger metadata compression in #11490, but we will get
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
when run Pulsar on JDK1.8.For branch-2.8 and master, build on JDK8 or JDK11, run on JDK8 can works.
For branch-2.8 and master, build on JDK8 or JDK11, run on JDK11 can works.
But for branch-2.7, both are works.
After investigating the issue, it's related to the
aircompressor
upgrade, we have upgradedaircompressor
from 0.16 to 0.19 #10983. After upgrade theaircompressor
version for branch-2.7, the error appears.Looks like related to the
aircompressor
, maybe need to add --release 1.8 foraircompressor
.The producer also using the
aircompressor
to compress data, but after the test on both branch-2.7, branch-2.8, and master, it works, no error happens. The difference is the producer run into this branchpulsar/pulsar-common/src/main/java/org/apache/pulsar/common/compression/CompressionCodecZstd.java
Line 65 in 6704f12
pulsar/pulsar-common/src/main/java/org/apache/pulsar/common/compression/CompressionCodecZstd.java
Line 72 in 6704f12
To Reproduce
Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: