From 3d9ed9c51bcfe7b93c5c8beedf9883933c347ab0 Mon Sep 17 00:00:00 2001 From: jules Ivanic Date: Tue, 18 Jul 2023 13:12:51 +0400 Subject: [PATCH] Fix "SEVERE: Unable to initialize BouncyCastleAlpnSslUtils." error See https://github.com/netty/netty/issues/11638#issuecomment-912666352 --- build.sbt | 4 +++- .../main/resources/META-INF/native-image/reflect-config.json | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index f44bba0..323f81f 100644 --- a/build.sbt +++ b/build.sbt @@ -103,7 +103,9 @@ lazy val cli = "--install-exit-handlers", "--diagnostics-mode", // "-H:+BuildReport", // only available on Oracle GraalVM - "-H:ExcludeResources=.*.jar,.*.properties" + "-H:ExcludeResources=.*.jar,.*.properties", + "-Djdk.http.auth.tunneling.disabledSchemes=", + "--initialize-at-run-time=io.netty.handler.ssl.BouncyCastleAlpnSslUtils", ) }, nativeImageAgentMerge := true, diff --git a/modules/cli/src/main/resources/META-INF/native-image/reflect-config.json b/modules/cli/src/main/resources/META-INF/native-image/reflect-config.json index 8d53cbb..3dcfa00 100644 --- a/modules/cli/src/main/resources/META-INF/native-image/reflect-config.json +++ b/modules/cli/src/main/resources/META-INF/native-image/reflect-config.json @@ -104,6 +104,10 @@ "name":"io.netty.util.ReferenceCountUtil", "queryAllDeclaredMethods":true }, +{ + "name":"io.netty.util.ResourceLeakDetector$DefaultResourceLeak", + "fields":[{"name":"droppedRecords"}, {"name":"head"}] +}, { "name":"io.netty.util.concurrent.DefaultPromise", "fields":[{"name":"result"}]