Closed bipul31 closed 6 months ago
Could you check the entire dependency:tree
output (not just the section from google-ads
) to see if you have other io.grpc
dependencies, either directly or indirectly? That error suggests that your project has such dependencies, and they are overriding the io.grpc
version pulled in via the dependency on google-ads
.
Thanks
Sharing the complete dependency tree. Can't see any other io.grpc
dependency apart from google-ads
dependency tree.txt
I just realized that you have the following:
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax</artifactId>
<version>2.42.0</version>
</dependency>
Version 29.0.0 of google-ads
depends on gax version 2.32.0. I suspect that's where the conflict is occurring.
I'm actually in the process of releasing 30.0.0 of google-ads
today, which will upgrade the gax dependency to 2.43.0. You might want to wait a few hours and just upgrade straight to google-ads
30.0.0 and gax 2.43.0.
Thanks, Josh
Version 30.0.0
of com.google.api-ads:google-ads
is now available.
Getting the same error with the version upgrade as well dependency tree.txt google_ads_error.txt using these google dependencies
<dependency>
<groupId>com.google.api-ads</groupId>
<artifactId>google-ads</artifactId>
<version>30.0.0</version>
<exclusions>
<exclusion>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-credentials</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax</artifactId>
<version>2.43.0</version>
</dependency>
<dependency>
<groupId>com.google.api</groupId>
<artifactId>gax-grpc</artifactId>
<version>2.43.0</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.0.0-jre</version>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-credentials</artifactId>
<version>1.23.0</version>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
<version>1.23.0</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.23.2</version>
</dependency>
I see that the dependency
entries you have after google-ads
are specifying versions that differ from what google-ads:30.0.0
uses:
Dependency | your version | google-ads:30.0.0 version |
---|---|---|
gax | 2.43.0 | 2.43.0 |
guava | 33.0.0 | 32.1.3 |
google-auth-library-* | 1.23.0 | 1.23.0 |
protobuf-java | 3.23.2 | 3.25.0 |
Could you update your pom to align the dependency sets and see if that changes the outcome of your test?
Also, looking at the end of your google_ads_error.txt
file, I see the root cause is java.lang.VerifyError: Cannot inherit from final class
while it's trying to instantiate io.grpc.xds.WeightedRoundRobinLoadBalancerProvider
. Are there any other errors in your logs before the failure?
Thanks, Josh
Getting same error after updating the versions. Are there any other errors in your logs before the failure? No other error before the failure.
Thanks Bipul
Are you seeing the same results in all environments, or does it work on one host but not the other?
One option you could try is to enable verbose class loading logging in your Java process. Many JVMs support the -verbose:class
argument for this, and it would allow you to see which JAR file the JVM is using for each class. That will tell us if something in your process is loading classes from a different version of the JARs than expected.
Thanks, Josh
It's been a few weeks since the last comment here, so I'm assuming this issue is resolved and will close it. However, feel free to reopen if you still have questions.
Thanks, Josh
What is your question? While upgrading version from 13 to 15, I had to increase pom dependency as well. We have updated the version mentioned below.
For these pom dependencies we have a dependency tree mention below
And we are getting the following error :
"Handler dispatch failed; nested exception is java.util.ServiceConfigurationError: io.grpc.LoadBalancerProvider: Provider io.grpc.xds.WeightedRoundRobinLoadBalancerProvider could not be instantiated"
Please help us to find the resolution for the same. Thanks