Closed debedb closed 3 years ago
I'm guessing that your production project has a transitive dependency on proto-google-common-protos
from a version prior to when FieldBehaviourProto
was added.
Can you run mvn dependency:tree -Dverbose
on the prod project and check to see if there's a conflict on proto-google-common-protos
? If so that would explain the difference in behaviour, since maven doesn't know which version to load.
Right, I should have done that first. The
com.google.api.grpc:proto-google-common-protos:jar:1.14.0
which doesn't have the field yet, is brought in by
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-storage</artifactId>
<version>1.63.0</version>
</dependency>
I'll close this.
I'm trying to run the GetAccountHierarchy example. It works perfectly fine when run ass part of a small example project (call it SampleProject) with the following pom.xml:
However, when used in a larger project (call it ProdProject -- here it is hard to isolate a reproducible case) the error in the subject appears, with the following stack trace:
Because there's some formatting differences between the example here and as run, clarifying that
GetAccountHierarchy.java:271
isand
GetAccountHierarchy.java:124
isThis ProdProject does not directly reference the api-ads libraries, but instead references LibProject which in turn has the following google libraries
As a workaround, adding the following to the pom.xml of the ProdProject works:
However, it would be good to understand what the problem is and why the SampleProject works without this dependency.