java-driver
java-driver copied to clipboard
Problem building with Oracle's Java 11
When building code in PR #109 with a fresh Ubuntu Docker container with only Oracle's jdk-11.0.14_linux-x64_bin.deb installed, make preview in docs directory fails with:
ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /root/java-driver/core/src/main/java/com/datastax/oss/driver/internal/core/loadbalancing/helper/LocalDcHelper.java:[21,17] cannot access java.util.Map
bad class file: /modules/java.base/java/util/Map.class
class file has wrong version 55.0, should be 53.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc (default-cli) on project java-driver-core: An error has occurred in Javadoc report generation:
[ERROR] Exit code: 1 - javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] javadoc: warning - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
[ERROR] /root/java-driver/core/src/main/java/com/datastax/oss/driver/api/core/CqlIdentifier.java:44: error: attribute not supported in HTML5: summary
[ERROR] * <table summary="examples">
[ERROR] ^
[ERROR] /root/java-driver/core/src/main/java/com/datastax/oss/driver/api/core/metrics/Metrics.java:41: error: unknown tag: leaks-private-api
[ERROR] * @leaks-private-api
[ERROR] ^
[ERROR] /root/java-driver/core/src/main/java/com/datastax/oss/driver/api/core/type/reflect/GenericType.java:353: error: unknown tag: leaks-private-api
[ERROR] * @leaks-private-api
[ERROR] ^
[ERROR]
[ERROR] Command line was: /usr/lib/jvm/jdk-11/bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/root/java-driver/core/target/site/apidocs' dir.
[ERROR]
[ERROR] -> [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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <args> -rf :java-driver-core
Here's what I found out so far: (Whole process was messier, but I'm omitting delving into other paths for readability) I've tried building with OpenJDK 11 and was greeted with analogous error
[wb@fedora java-driver]$ mvn -v
Apache Maven 3.6.3 (Red Hat 3.6.3-8)
Maven home: /usr/share/maven
Java version: 11.0.14.1, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-11-openjdk-11.0.14.1.1-5.fc34.x86_64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.16.18-100.fc34.x86_64", arch: "amd64", family: "unix"
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project java-driver-core: Compilation failure
[ERROR] /home/wb/gites/java-driver/core/src/main/java/com/datastax/dse/driver/internal/core/DseProtocolFeature.java:[26,8] cannot access java.lang.Enum
[ERROR] bad class file: /modules/java.base/java/lang/Enum.class
[ERROR] class file has wrong version 55.0, should be 53.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR]
Version 55 corresponds to Java 11 and version 53 corresponds to Java 9. For some reason we try to use Java 11 APIs when Java 9 is expected. It's a little weird that Java 9 is expected though. Both target and source options are set to Java 8 in pom.xml, but to make sure we use correct APIs bootclasspath also needs to be set. Since Java 9 we can use release option to set all those 3 things correctly for cross-compilation. So I've updated maven-compiler-plugins config with release set to 8. (Note that here's where configuration gets messy if we want to support multiple JDK versions. There's no release option in Java 8 so for building with that version it will need to be excluded)
After mvn clean running mvn -X verify results in:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project java-driver-core: Compilation failure
[ERROR] /home/wb/gites/java-driver/core/src/main/java/com/datastax/dse/driver/internal/core/DseProtocolFeature.java:[26,8] cannot access java.lang.Enum
[ERROR] bad class file: /8769A/java/lang/Enum.sig
[ERROR] class file has wrong version 55.0, should be 53.0
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR]
Same error, but module path and file extension changed. So setting release probably did something, but to be sure I've tried setting different Java versions (with 9 we get sneaky non-colored Fatal Error: Unable to find package java.lang in classpath or bootclasspath next to [INFO] line).
Next I've started a new Maven project and wrote simple HelloWorld. I've added an Enum that implements empty interface, same as in DseProtocolFeature.java to it and step by step replicated maven-compiler-plugin configuration in HelloWorld project. Turned out using <compilerId>javac-with-errorprone</compilerId> breaks the HelloWorld. javac worked fine but with errorprone we get similar bad class file error, wrong version 55, expected 53. Enum was not even necessary - the same happens with String.sig.
Some googling revealed an interesting thread: https://github.com/google/error-prone/issues/1242
TL;DR: The way we use ErrorProne is several years old and there's different configuration for JDK 11; "plexus-compiler-javac-errorprone is no longer (actively) maintained"
Also if we use the new "-XPlugin way" we need another thing with separate config for JDK 8 (set bootclasspath or old compiler), probably through a new profile in pom.xml.
Anyway i updated the pom.xml (but I used version 2.3.4 for com.google.errorprone dependency) and tried building once again.
Finally the build fails on javadoc rather than compile plugin:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (attach-javadocs) on project java-driver-core: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 2 - javadoc: error - No source files for package com.datastax.oss.driver.api
[ERROR]
[ERROR] Command line was: /usr/lib/jvm/java-openjdk/bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/home/wb/gites/java-driver/core/target/apidocs' dir.
[ERROR]
[ERROR] -> [Help 1]
Now I don't remember what exactly causes that, but setting source and release parameters to 8 in maven-javadoc-plugin resolves this problem and results in something seemingly easier to fix:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (attach-javadocs) on project java-driver-core: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - /home/wb/gites/java-driver/core/src/main/java/com/datastax/oss/driver/api/core/CqlIdentifier.java:44: error: attribute not supported in HTML5: summary
[ERROR] * <table summary="examples">
[ERROR] ^
[ERROR] /home/wb/gites/java-driver/core/src/main/java/com/datastax/oss/driver/api/core/metrics/Metrics.java:41: error: unknown tag: leaks-private-api
[ERROR] * @leaks-private-api
[ERROR] ^
[ERROR] /home/wb/gites/java-driver/core/src/main/java/com/datastax/oss/driver/api/core/type/reflect/GenericType.java:353: error: unknown tag: leaks-private-api
[ERROR] * @leaks-private-api
[ERROR] ^
[ERROR]
[ERROR] Command line was: /usr/lib/jvm/java-openjdk/bin/javadoc @options @packages
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/home/wb/gites/java-driver/core/target/apidocs' dir.
[ERROR]
Summary attribute looks like something added to satisfy Java 8 javadoc, but it doesn't work with html5 output in Java 11. Luckily its just 1 occurence and we can just use <caption>examples</caption> inside instead to satisfy both versions.
For unknown tag as suggested I've added a custom tag definition inside javadoc plugin's config in pom.xml. There's an existing comment saying that dash separators are not handled properly, but I'm not sure what that means. Maybe it's an issue when building with older JDK or maybe docs end up slightly malformed silently.
Fixing that leads to:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:jar (attach-javadocs) on project java-driver-core-shaded: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - /home/wb/gites/java-driver/core-shaded/target/shaded-sources/com/datastax/oss/driver/shaded/netty/util/internal/PlatformDependent0.java:20: error: package sun.misc does not exist
[ERROR] import sun.misc.Unsafe;
[ERROR] ^
[ERROR] /home/wb/gites/java-driver/core-shaded/target/shaded-sources/com/datastax/oss/driver/shaded/netty/util/internal/PlatformDependent0.java:61: error: cannot find symbol
[ERROR] static final Unsafe UNSAFE;
[ERROR] ^
[ERROR] symbol: class Unsafe
[ERROR] location: class PlatformDependent0
[ERROR] /home/wb/gites/java-driver/core-shaded/target/shaded-sources/com/datastax/oss/driver/shaded/netty/util/internal/shaded/org/jctools/util/UnsafeAccess.java:16: error: package sun.misc does not exist
[ERROR] import sun.misc.Unsafe;
[ERROR] ^
[ERROR] /home/wb/gites/java-driver/core-shaded/target/shaded-sources/com/datastax/oss/driver/shaded/netty/util/internal/shaded/org/jctools/util/UnsafeAccess.java:40: error: cannot find symbol
[ERROR] public static final Unsafe UNSAFE;
[ERROR] ^
[ERROR] symbol: class Unsafe
[ERROR] location: class UnsafeAccess
[ERROR] /home/wb/gites/java-driver/core-shaded/target/shaded-sources/com/datastax/oss/driver/shaded/netty/util/internal/shaded/org/jctools/util/UnsafeAccess.java:49: error: cannot find symbol
[ERROR] private static Unsafe getUnsafe()
[ERROR] ^
[ERROR] symbol: class Unsafe
[ERROR] location: class UnsafeAccess
[ERROR]
[ERROR] Command line was: /usr/lib/jvm/java-openjdk/bin/javadoc @options @argfile
[ERROR]
[ERROR] Refer to the generated Javadoc files in '/home/wb/gites/java-driver/core-shaded/target/apidocs' dir.
[ERROR]
[ERROR] -> [Help 1]
Looks like we moved past 'core' at least:
[INFO] Java Driver for Scylla and Apache Cassandra ........ SUCCESS [ 1.152 s]
[INFO] Java driver for Scylla and Apache Cassandra(R) - core SUCCESS [01:56 min]
[INFO] Java driver for Scylla and Apache Cassandra(R) - core with shaded deps FAILURE [ 8.715 s]
Speaking of error, there's an open issue related to that: https://bugs.openjdk.java.net/browse/JDK-8206937
Seems like these APIs are in different module in Java 9+. Another item to the list of things that need to be done differently with Java 8 in comparison to Java 11.
What's weird is that it fails with javadoc plugin rather than during compile.
This is the point where I've stopped for now. It seems that necessary changes are starting to pile up a little too much.
Upping versions of maven-javadoc-plugin, maven-compiler-plugin or error_prone_core also brings new errors and warnings if i recall correctly.
One more error that I've encountered when trying different things, that I think is worth pointing out is the same warning mentioned here:
https://datastax-oss.atlassian.net/browse/JAVA-2610#icft=JAVA-2610
I'm not sure what did I do differently when redoing all those steps that I did not stumble upon it this time around, but it also could become an issue unless we drop failOnWarning setting.
Now the question I have is: should I try to dig further how to make build Java 11 compatible or is it not worth it?
Now the question I have is: should I try to dig further how to make build Java 11 compatible or is it not worth it?
I'd be happy with Java 17... I hope upstream did already most of this.
Closing as I don't think it's relevant anymore.