Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
Description
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] Compiling 54 source files to /home/todd/Documents/arrow/java/format/target/classes [WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment. [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for Apache Arrow Java Root POM 8.0.0-SNAPSHOT: [INFO] [INFO] Apache Arrow Java Root POM ......................... SUCCESS [ 5.170 s] [INFO] Arrow Format ....................................... FAILURE [ 1.357 s] [INFO] Arrow Memory ....................................... SKIPPED [INFO] Arrow Memory - Core ................................ SKIPPED [INFO] Arrow Memory - Unsafe .............................. SKIPPED [INFO] Arrow Memory - Netty ............................... SKIPPED [INFO] Arrow Vectors ...................................... SKIPPED [INFO] Arrow Compression .................................. SKIPPED [INFO] Arrow Tools ........................................ SKIPPED [INFO] Arrow JDBC Adapter ................................. SKIPPED [INFO] Arrow Plasma Client ................................ SKIPPED [INFO] Arrow Flight ....................................... SKIPPED [INFO] Arrow Flight Core .................................. SKIPPED [INFO] Arrow Flight GRPC .................................. SKIPPED [INFO] Arrow Flight SQL ................................... SKIPPED [INFO] Arrow Flight Integration Tests ..................... SKIPPED [INFO] Arrow AVRO Adapter ................................. SKIPPED [INFO] Arrow Algorithms ................................... SKIPPED [INFO] Arrow Performance Benchmarks ....................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 6.890 s [INFO] Finished at: 2022-04-28T15:39:11-06:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.2:compile (default-compile) on project arrow-format: Compilation failure -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <args> -rf :arrow-format todd@todd-ThinkPad-W541:~/Documents/arrow/java$ javac -version javac 16.0.1 todd@todd-ThinkPad-W541:~/Documents/arrow/java$ /opt/ apache-maven-3.8.5/ google/ maven/ todd@todd-ThinkPad-W541:~/Documents/arrow/java$ mvn -version Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0) Maven home: /opt/maven Java version: 16.0.1, vendor: Private Build, runtime: /usr/lib/jvm/java-16-openjdk-amd64 Default locale: en_US, platform encoding: UTF-8 OS name: "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..
Attachments
Issue Links
- relates to
-
ARROW-15755 [Java] Support Java 17
- Resolved
- links to