combination of protoc version, protobuf-java, and grpc-java

1,326 views
Skip to first unread message

Ronak Prajapati

unread,
Feb 22, 2022, 10:07:02 AM2/22/22
to grpc.io
Hi Team,

How can I find 
right combination of protoc version, protobuf-java, and grpc-java.

can you suggest me this and how can I download it I want to use it in  my standalone application. 

I will build my own script build protoc and then wamt use GRPC library to send it from client to server.

right now I am facing below issue,

!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userAccountUniqueId_)
Where I am using protoc-3.19.0-win64 and protobuf-java-3.17.2 jar

In which this isStringEmpty method doees not exist. But protoc is generating this code.

Eric Anderson

unread,
Mar 7, 2022, 11:19:51 AM3/7/22
to Ronak Prajapati, grpc.io
It sounds like you aren't using Maven or Gradle.

For the generated code, if generating code with version X of protoc or the gRPC plugin, you need to use the corresponding Java components (runtime) at version X or later.

You are using protoc 3.19.0, so you need to use protobuf-java 3.19.0 or later. Similarly, if you were using protoc-gen-grpc-java 1.43.0, you'd need to use grpc-protobuf 1.43.0 or later. For simplicity the versions of the code generator and the runtime generally match; newer runtimes support older generated code to allow combining generated code from multiple sources (libraries) and isn't all that important when you are running the generator and choosing the runtime version yourself.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/a2eb0b26-cc25-42b8-aa5b-7bd63044c031n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages