java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- java
- Área
- build-system
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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?
- Lenguaje dominante
- Java
- Estrellas
- 95
- Forks
- 154
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 9
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de apache/arrow-java
-
Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/arrow-java#1300 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
apache/arrow-java#1261 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/arrow-java#1236 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
apache/arrow-java#1230 ·
-
Type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
apache/arrow-java#1205 ·
Todos los issues de apache/arrow-java
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
infinispan/infinispan#18150 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
opensearch-project/k-NN#3597 ·
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100