Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-2624

Avoid ByteBuffer incompatibility when compiling with JDK9+

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.10.0
    • java
    • None

    Description

      Like MRESOLVER-85 and similar, the java implementation suffers from a compatibility break since java 9. The problem can be seen in the PR for AVRO-2603, https://github.com/apache/avro/pull/706, which fails for JAVA 11, but not for 8.

      The error is:

      Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
        [py-test] 	at org.apache.avro.io.BinaryDecoder.readBytes(BinaryDecoder.java:317)
      
      • This should not occur when artifacts are compiled with JDK8, even if run in Java 11 runtime. i.e., This shouldn't be a big issue while maven artifacts are being published with JDK8 (the lowest Java runtime version we support).
      • Likewise, this should not occur when artifacts are compiled with JDK11 (with -target 1.8) and run in a Java 11 runtime, as with the JAVA=11 build targets.
      • This will occur when the artifacts are compiled with JDK11 (with -target 1.8) and run in a Java 8 runtime.
      • It will be important to fix when Avro publishes artifacts built with JDK11 and JDK8 is still meant to be supported.

      Attachments

        Issue Links

          Activity

            People

              dkulp Daniel Kulp
              kojiromike Michael A. Smith
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: