Please answer these questions before submitting your issue.
What version of gRPC are you using?
1.20.0
What did you expect to see?
The use of io.grpc:grpc-protobuf-lite and com.google.cloud:google-cloud-bigtable should not raise NoSuchMethodError.
While I was checking the compatibility of google libraries, I found grpc-protobuf-lite has classes that are not compatible with many GCP-related libraries (the list noted below), including com.google.cloud:google-cloud-bigtable:jar:0.84.0-alpha.
Example project to reproduce this issue: https://github.com/suztomo/protobuf-lite-vs-bigtable shows:
java.lang.NoSuchMethodError: com.google.protobuf.UnsafeByteOperations.unsafeWrap([B)Lcom/google/protobuf/ByteString;
at com.google.cloud.bigtable.data.v2.models.Range$ByteStringRange.prefix (Range.java:363)
at com.google.cloud.bigtable.data.v2.models.Range$ByteStringRange.prefix (Range.java:336)
at suztomo.App.main (App.java:14)
For grpc-protobuf-lite, I only found this sentence in the doc:
For Android client, use grpc-okhttp instead of grpc-netty-shaded and grpc-protobuf-lite instead of grpc-protobuf
from grpc-java documentation
Questions
- Would you explain the difference between
grpc-protobuf and grpc-protobuf-lite?
- Do you think the incompatibility between
io.grpc:grpc-protobuf-lite and com.google.cloud:google-cloud-bigtable is something that needs to be fixed (probably for Android apps accessing GCP services)?
Incompatible Libraries
Other libraries that seem not compatible with grpc-protobuf-lite includes: com.google.cloud:google-cloud-automl:jar:0.84.0-beta, com.google.cloud:google-cloud-bigquerydatatransfer:jar:0.84.0-beta, com.google.cloud:google-cloud-container:jar:0.84.0-beta, com.google.cloud:google-cloud-datastore:jar:1.66.0, and com.google.cloud:google-cloud-speech:jar:0.84.0-beta.
Please answer these questions before submitting your issue.
What version of gRPC are you using?
1.20.0
What did you expect to see?
The use of
io.grpc:grpc-protobuf-liteandcom.google.cloud:google-cloud-bigtableshould not raiseNoSuchMethodError.While I was checking the compatibility of google libraries, I found
grpc-protobuf-litehas classes that are not compatible with many GCP-related libraries (the list noted below), includingcom.google.cloud:google-cloud-bigtable:jar:0.84.0-alpha.Example project to reproduce this issue: https://github.com/suztomo/protobuf-lite-vs-bigtable shows:
For
grpc-protobuf-lite, I only found this sentence in the doc:Questions
grpc-protobufandgrpc-protobuf-lite?io.grpc:grpc-protobuf-liteandcom.google.cloud:google-cloud-bigtableis something that needs to be fixed (probably for Android apps accessing GCP services)?Incompatible Libraries
Other libraries that seem not compatible with
grpc-protobuf-liteincludes:com.google.cloud:google-cloud-automl:jar:0.84.0-beta,com.google.cloud:google-cloud-bigquerydatatransfer:jar:0.84.0-beta,com.google.cloud:google-cloud-container:jar:0.84.0-beta,com.google.cloud:google-cloud-datastore:jar:1.66.0, andcom.google.cloud:google-cloud-speech:jar:0.84.0-beta.