Skip to content

[Java][Docs] Provide guidance on supported Java versions in README #31789

Description

@asfimport

The README for Java lists the following requirements for a build envirnment:

  • Java 8 or later

  • Maven 3.3 or later

    However, compiling with Java 16 generates the following error:

    [INFO] --- maven-compiler-plugin:3.6.2:compile (default-compile) @arrow-format ---
    [INFO] Compiling54sourcefilesto /home/todd/Documents/arrow/java/format/target/classes
    [WARNING] Unabletoautodetect'javac'path, using'javac'fromtheenvironment.
    [INFO] ------------------------------------------------------------------------
    [INFO] ReactorSummaryforApacheArrowJavaRootPOM8.0.0-SNAPSHOT:
    [INFO] [INFO] ApacheArrowJavaRootPOM ......................... SUCCESS [ 5.170s]
    [INFO] ArrowFormat ....................................... FAILURE [ 1.357s]
    [INFO] ArrowMemory ....................................... SKIPPED
    [INFO] ArrowMemory - Core ................................ SKIPPED
    [INFO] ArrowMemory - Unsafe .............................. SKIPPED
    [INFO] ArrowMemory - Netty ............................... SKIPPED
    [INFO] ArrowVectors ...................................... SKIPPED
    [INFO] ArrowCompression .................................. SKIPPED
    [INFO] ArrowTools ........................................ SKIPPED
    [INFO] ArrowJDBCAdapter ................................. SKIPPED
    [INFO] ArrowPlasmaClient ................................ SKIPPED
    [INFO] ArrowFlight ....................................... SKIPPED
    [INFO] ArrowFlightCore .................................. SKIPPED
    [INFO] ArrowFlightGRPC .................................. SKIPPED
    [INFO] ArrowFlightSQL ................................... SKIPPED
    [INFO] ArrowFlightIntegrationTests ..................... SKIPPED
    [INFO] ArrowAVROAdapter ................................. SKIPPED
    [INFO] ArrowAlgorithms ................................... SKIPPED
    [INFO] ArrowPerformanceBenchmarks ....................... SKIPPED
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILDFAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Totaltime: 6.890s
    [INFO] Finishedat: 2022-04-28T15:39:11-06:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failedtoexecutegoalorg.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) onprojectarrow-format: Compilationfailure -> [Help1]
    [ERROR] [ERROR] Toseethefullstacktraceoftheerrors, re-runMavenwiththe -eswitch.
    [ERROR] Re-runMavenusingthe -Xswitchtoenablefulldebuglogging.
    [ERROR] [ERROR] Formoreinformationabouttheerrorsandpossiblesolutions, pleasereadthefollowingarticles:
    [ERROR] [Help1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
    [ERROR] [ERROR] Aftercorrectingtheproblems, youcanresumethebuildwiththecommand
    [ERROR] mvn <args> -rf :arrow-formattodd@todd-ThinkPad-W541:~/Documents/arrow/java$javac -versionjavac16.0.1todd@todd-ThinkPad-W541:~/Documents/arrow/java$ /opt/
    apache-maven-3.8.5/ google/ maven/ todd@todd-ThinkPad-W541:~/Documents/arrow/java$mvn -versionApacheMaven3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
    Mavenhome: /opt/mavenJavaversion: 16.0.1, vendor: PrivateBuild, runtime: /usr/lib/jvm/java-16-openjdk-amd64Defaultlocale: en_US, platformencoding: UTF-8OSname: "linux", version: "5.13.0-40-generic", arch: "amd64", family: "unix"
    todd@todd-ThinkPad-W541:~/Documents/arrow/java$

    Reverting to Java 11 eliminated the error.

    It's worth noting that the error messages are opaque - there's no specific indication that the problem is a version incompatibility. While there is a reference to supported Java versions in the installation page of the documentation, it's easy enough for that to be missed in favor of the README. It could be useful to also codify supported versions through maven enforcement, supplying a less opaque error message when an incompatible Java version is used..

Reporter: Todd Farmer / @toddfarmer
Assignee: Todd Farmer / @toddfarmer

Related issues:

PRs and other links:

Note: This issue was originally created as ARROW-16412. Please see the migration documentation for further details.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions