Skip to content

Conversation

@ejona86
Copy link
Member

@ejona86 ejona86 commented May 16, 2022

This was observed in the Bazel/Blaze build where io.grpc.util is a
separate target from the rest of core. During the build of a library
SecretRoundRobinLoadBalancerProvider was not on the classpath, and the
library was later included into a binary using grpc-core from Maven
Central which includes SecretRoundRobinLoadBalancerProvider.

java.util.ServiceConfigurationError: Provider io.grpc.util.SecretRoundRobinLoadBalancerProvider$Provider could not be instantiated java.lang.ClassCastException: class io.grpc.util.SecretRoundRobinLoadBalancerProvider$Provider cannot be cast to some.app.aaa.aab 

CC @YifeiZhuang

This was observed in the Bazel/Blaze build where io.grpc.util is a separate target from the rest of core. During the build of a library SecretRoundRobinLoadBalancerProvider was not on the classpath, and the library was later included into a binary using grpc-core from Maven Central which includes SecretRoundRobinLoadBalancerProvider. ``` java.util.ServiceConfigurationError: Provider io.grpc.util.SecretRoundRobinLoadBalancerProvider$Provider could not be instantiated java.lang.ClassCastException: class io.grpc.util.SecretRoundRobinLoadBalancerProvider$Provider cannot be cast to some.app.aaa.aab ```
@ejona86 ejona86 requested a review from sergiitk May 16, 2022 17:52
@ejona86 ejona86 merged commit b5e78d5 into grpc:master May 16, 2022
@ejona86 ejona86 deleted the spi-ignore-classcastex branch May 16, 2022 20:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants