Java SDK: class io.temporal.api.workflowservice.v1.GetSystemInfoRequest tried to access private field com.google.protobuf.AbstractMessage.memoizedSize

I’m struggling with some java dependency problems and could use some help if anyone is willing.

I’m using io.temporal/temporal-sdk 1.23.2 , but my application is pulling in other grpc.* and com.google.protobuf/* libraries as transitive dependencies.
I’ve tried to exclude a bunch of transitive deps so that temporal is getting exactly the versions of libraries that it explicitly depends on, but I still hit this exception everytime I run my application:

 class io.temporal.api.workflowservice.v1.GetSystemInfoRequest tried to access private field com.google.protobuf.AbstractMessage.memoizedSize

I tried to find io.temporal.api.workflowservice.v1.GetSystemInfoRequest in the source code on github, but I couldn’t find it. Is that class auto-generated from a protobuf configuration?

Could I get help knowing what transitive grpc/protofbuf library versions I can use to avoid this exception?

Hi Adam,

it is auto-generated from api/temporal/api/workflowservice/v1/request_response.proto at 7ddad087564de40bf3a061f0bc3c96d97559886e · temporalio/api · GitHub

You can find the jar here https://mvnrepository.com/artifact/io.temporal/temporal-serviceclient

Can you share the pom to reproduce this?

I was able to fix my problem.

The com.google.protobuf.AbstractMessage class has a field called memoizedSize that marked private as of com.google.protobuf/protobuf-java version 2.6.1. In version 3.0.0 of that library the field was changed to protected.

I was inadvertently pulling in an old version of protobuf-java through some com.google.cloud library.