Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ for artifact in "${artifact_list[@]}"; do
if [ ${#bad_contents[@]} -eq 0 ] && [ "${class_count}" -lt 1 ]; then
bad_contents=("The artifact contains no java class files.")
fi
# dnsjava ships its provider class only under META-INF/versions/, which relocation leaves at an
# unrelocated path in a jar that is not multi-release, so the declaration names a class the JVM
# cannot load and every DNS lookup in the process fails. See HBASE-30211.
if "${JAR}" tf "${artifact}" | grep -q '^META-INF/services/java\.net\.spi\.InetAddressResolverProvider$'; then
bad_contents+=("Declares java.net.spi.InetAddressResolverProvider, which breaks all DNS resolution on JDK18+")
fi
if [ ${#bad_contents[@]} -gt 0 ]; then
echo "[ERROR] Found artifact with unexpected contents: '${artifact}'"
echo " Please check the following and either correct the build or update"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ for artifact in "${artifact_list[@]}"; do
if [ ${#bad_contents[@]} -eq 0 ] && [ "${class_count}" -lt 1 ]; then
bad_contents=("The artifact contains no java class files.")
fi
# dnsjava ships its provider class only under META-INF/versions/, which relocation leaves at an
# unrelocated path in a jar that is not multi-release, so the declaration names a class the JVM
# cannot load and every DNS lookup in the process fails. See HBASE-30211.
if "${JAR}" tf "${artifact}" | grep -q '^META-INF/services/java\.net\.spi\.InetAddressResolverProvider$'; then
bad_contents+=("Declares java.net.spi.InetAddressResolverProvider, which breaks all DNS resolution on JDK18+")
fi
if [ ${#bad_contents[@]} -gt 0 ]; then
echo "[ERROR] Found artifact with unexpected contents: '${artifact}'"
echo " Please check the following and either correct the build or update"
Expand Down
3 changes: 3 additions & 0 deletions hbase-shaded/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,9 @@
<exclude>jnamed*</exclude>
<exclude>lookup*</exclude>
<exclude>update*</exclude>
<!-- SPI provider ships only under META-INF/versions/18; this jar is not
multi-release, so keeping the service file breaks DNS on JDK18+ -->
<exclude>META-INF/services/java.net.spi.InetAddressResolverProvider</exclude>
Comment thread
junegunn marked this conversation as resolved.
</excludes>
</filter>
<filter>
Expand Down