diff --git a/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/nativeimage/GrpcNettyFeature.java b/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/nativeimage/GrpcNettyFeature.java index 23db568b72..bbd899b284 100644 --- a/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/nativeimage/GrpcNettyFeature.java +++ b/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/nativeimage/GrpcNettyFeature.java @@ -85,6 +85,26 @@ private static void loadGrpcNettyClasses(BeforeAnalysisAccess access) { registerClassForReflection(access, "io.grpc.netty.shaded.io.netty.channel.DefaultFileRegion"); registerClassForReflection( access, "io.grpc.netty.shaded.io.netty.channel.unix.PeerCredentials"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.grpc.netty.WriteBufferingAndExceptionHandler"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.channel.ProtocolNegotiators"); + registerClassForReflection(access, "io.grpc.netty.shaded.io.netty.handler.ssl.SslHandler"); + registerClassForReflection(access, "io.grpc.netty.shaded.io.grpc.netty.NettyClientHandler"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$TailContext"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$WaitUntilActiveHandler"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$ClientTlsHandler"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.grpc.netty.ProtocolNegotiators$GrpcNegotiationHandler"); + registerClassForReflection( + access, "io.grpc.netty.shaded.io.netty.channel.ChannelHandlerMask"); // Epoll Libraries registerClassForReflection(access, "io.grpc.netty.shaded.io.netty.channel.epoll.Epoll"); diff --git a/gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/native-image.properties b/gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/native-image.properties index b66e70603f..262f5d17a2 100644 --- a/gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/native-image.properties +++ b/gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/native-image.properties @@ -9,7 +9,8 @@ Args=--add-opens=java.base/java.time=ALL-UNNAMED \ io.grpc.netty.shaded.io.netty.channel.epoll,\ io.grpc.netty.shaded.io.netty.channel.unix,\ io.grpc.netty.shaded.io.netty.handler.ssl,\ - io.grpc.internal.RetriableStream \ + io.grpc.internal.RetriableStream,\ + io.grpc.netty.shaded.io.netty \ --features=com.google.api.gax.grpc.nativeimage.ProtobufMessageFeature,\ com.google.api.gax.grpc.nativeimage.GrpcNettyFeature \ -H:-RunReachabilityHandlersConcurrently \ No newline at end of file diff --git a/gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/reflect-config.json b/gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/reflect-config.json index 69f24071df..463a4bb1d5 100644 --- a/gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/reflect-config.json +++ b/gax-java/gax-grpc/src/main/resources/META-INF/native-image/com.google.api/gax-grpc/reflect-config.json @@ -283,5 +283,44 @@ "name": "selectedKeys" } ] + }, + { + "name" : "com.google.auth.oauth2.ServiceAccountCredentials", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true, + "queryAllPublicConstructors" : true, + "queryAllDeclaredConstructors" : true, + "queryAllPublicMethods" : true, + "queryAllDeclaredMethods" : true + }, + { + "name" : "org.apache.commons.pool2.impl.DefaultEvictionPolicy", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true, + "queryAllPublicConstructors" : true, + "queryAllDeclaredConstructors" : true, + "queryAllPublicMethods" : true, + "queryAllDeclaredMethods" : true + }, + { + "name" : "java.nio.channels.spi.SelectorProvider", + "allDeclaredConstructors" : true, + "allPublicConstructors" : true, + "allDeclaredMethods" : true, + "allPublicMethods" : true, + "allDeclaredFields" : true, + "allPublicFields" : true, + "queryAllPublicConstructors" : true, + "queryAllDeclaredConstructors" : true, + "queryAllPublicMethods" : true, + "queryAllDeclaredMethods" : true } ]