I am adding akka persistence spanner in a project which is already using pubsub from google.
Adding com.lightbend.akka:akka-persistence-spanner_2.12:1.0.0.RC3 library to the project is causing the following error during the method call Subscriber.startAsync().awaitRunning() (from pubsub library com.google.cloud:google-cloud-pubsub:1.108.0).
Caused by: java.lang.NoSuchMethodError: com.google.iam.v1.SetIamPolicyRequest.getDefaultInstance()Lcom/google/iam/v1/SetIamPolicyRequest;
Looks like the the akka-persistence-spanner library contains classes with same package name and class name as the ones in com.google.api.grpc:proto-google-iam-v1 and is causing this error.
In pom.xml, adding com.google.api.grpc:proto-google-iam-v1 library first and then including akka-persistence-spanner library seems to make it work with google spanner instance and pubsub for the application logic. This change is breaking tests using SpannerKit as I believe SpannerKit is expecting the classes redefined in akka persistence spanner library.
Is there a way to make the library work in both test and application?
Note: Adding spanner tag as per https://github.com/akka/akka-persistence-spanner doesn’t seem to work.
3 posts - 2 participants