Closed pjfanning closed 1 week ago
ByteBuffer inherits rewind from Buffer and Java 8 has this method.
https://docs.oracle.com/javase/8/docs/api/java/nio/Buffer.html#rewind--
I have seem issues in Java 8 where you need to cast to java.nio.Buffer for this to work reliably.
In https://issues.apache.org/jira/browse/HADOOP-18197, there were issues where we got on some Java8 installations.
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
We had to upgrade protobuf-java (which had the ByteBuffer code that was causing us issues) to get this fix: https://github.com/protocolbuffers/protobuf/commit/d40aadf823cf7e1e62b65561656f689da8969463
See https://www.morling.dev/blog/bytebuffer-and-the-dreaded-nosuchmethoderror/
Arrow has this cast in a different part of the code.
Could we add a similar cast in the method that is causing issues? https://github.com/apache/arrow/blob/dcdf4e6953b7fdab6078c444c8d07a606750fec1/java/vector/src/main/java/org/apache/arrow/vector/ipc/message/MessageSerializer.java#L704
Issue resolved by pull request 41718 https://github.com/apache/arrow/pull/41718
@lidavidm @assignUser This was also reported (@pan3793)
https://github.com/apache/arrow/pull/41718#issuecomment-2119816144
@vibhatha ^
Describe the bug, including details regarding any error messages, version, and platform.
arrow-vector 16.0.0 works fine for us but upgrading to 16.1.0 causes compile issues for us when we build with Java 8.
We found this in the Apache Pekko CI build.
Component(s)
Java