java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- java
- Lĩnh vực
- build-system
Hướng nghiên cứu
Start at the ArrowBuf.setBytes stack frame and the arrow-java 17.0.0 build configuration, then inspect the generated bytecode's use of java.nio.ByteBuffer.position(int) against the Java 8 API. Done means the library can run in the reported Java 1.8 Spark environment without this NoSuchMethodError, with the relevant build or compatibility checks passing.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug, including details regarding any error messages, version, and platform.
We are experiencing a compatibility issue when using the arrow-java 17.0.0 library in a Spark application deployed on a Java 1.8 runtime environment.
java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
- at org.apache.arrow.memory.ArrowBuf.setBytes(ArrowBuf.java:847)
at org.apache.arrow.memory.ArrowBuf.setBytes(ArrowBuf.java:899)
at org.apache.arrow.vector.BaseVariableWidthVector.setSafe(BaseVariableWidthVector.java:1193)
at org.apache.spark.sql.execution.arrow.StringWriter.setValue(ArrowWriter.scala:256)
at org.apache.spark.sql.execution.arrow.ArrowFieldWriter.write(ArrowWriter.scala:135)
at org.apache.spark.sql.execution.arrow.ArrowWriter.write(ArrowWriter.scala:100)
The error indicates that the arrow-java JAR file contains bytecode that references the ByteBuffer.position(int)
method with a return type of Ljava/nio/ByteBuffer.
This specific method signature was introduced in JDK 9 as part of the covariance changes in ByteBuffer.
In JDK 8, the same method returns Ljava/nio/Buffer.
Seems library being compiled with a newer JDK (9 or above)
without specifying the correct cross-compilation flags (-release or -bootclasspath).
Without these flags, the compiler uses its own (newer) API signatures,
making the resulting bytecode incompatible with older JVMs.
It is possible comple library with proper flags and put it to maven repository?
- Ngôn ngữ chính
- Java
- Star
- 95
- Fork
- 154
- Merge trung bình
- 2 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 9
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của apache/arrow-java
-
Type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/arrow-java#1300 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
apache/arrow-java#1261 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/arrow-java#1236 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apache/arrow-java#1230 ·
-
Type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
apache/arrow-java#1205 ·
Tất cả issue của apache/arrow-java
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
[BUG]茶杯方块在取茶时会引发崩溃 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Cannot differ own consent and managed consents in My Consents view and detailed consent view. Đang mở1.0.0-alpha2 Type/Improvement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
wso2/dpdp-accelerator#272 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100