New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PubSub] Caused by: java.lang.ClassNotFoundException: io.grpc.internal.BaseDnsNameResolverProvider #217
Comments
@hannahrogers-google worth making sure there isn't some dependency issue in the 1.105 release. |
It looks like there were a number of dependency updates in 1.105.1: https://github.com/googleapis/java-pubsub/releases/tag/v1.105.1 I will try and reproduce this issue. |
It looks like we upgraded to grpc v1.29.0 in this release, and io.grpc.internal.DnsNameResolverProvider.enable_grpclb was removed in this version: https://github.com/grpc/grpc-java/releases/tag/v1.29.0 However, with version 1.105.1, I was able to successfully shutdown a subscriber without running into the above issue. @lpellegr, can you tell me more about the environment you are running in? |
fwiw, I'm also running into this while trying to run the basic Java examples from https://github.com/googleapis/google-cloud-java/blob/master/google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/CreateTopicAndPublishMessages.java. My gradle file only has one dependency:
Here is my stacktrace -
I tracked this down to grpc/grpc-java#7002 before figuring out downgrading to Trying to proposed solutions in the linked grpc-java issue did not work for me. |
Thanks davinchia, I was able to reproduce this issue running the above sample with gradle. Looking at ./gradlew dependencies, gax (version 1.56.0) depends on grpc-alts 1.28.1, which is why we are seeing this issue. Forcing the 'io.grpc:grpc-alts' to 1.29.0 seems to resolve the issue. @chingor13, any plans to upgrade the grpc dependency for gax? Or would it be better for us to revert back to grpc 1.28.1? |
Ideally, the user should use on of our BOMs for dependency conflict resolution like Also opened a PR to update grpc/protobuf in gax: googleapis/gax-java#1125 |
Fixed in v1.108.0 |
Upgrading to version
1.105.1
from version1.104.1
for packagecom.google.cloud:google-cloud-pubsub
, when executing the following piece of code:I get the following exception:
The root cause is:
In the classpath I have protobuf, guava, lettuce and spring-boot-starter (all up-to-date). Java 14 is used.
A workaround is to downgrade to version 1.104.1.
The text was updated successfully, but these errors were encountered: