sdk-java
sdk-java copied to clipboard
Test Server fails when starting a workflow that already exists.
I am running an integration test that is passing fine on both, a local docker-compose based server and on Temporal Cloud. But on the test server it fails immediately, and the server throws an internal exception.
-
The test starts a workflow. (That succeeds.)
-
Then it attempts to start a workflow with the same Workflow Id as the workflow just started.
-
The test expects to get an
AlreadyExistsgRPC status / error from theStartWorkflowExecution(..)gRPC call. -
Instead, it gets an unspecified gRPC error and the test server displays the following:
PS > .\temporal-test-server.exe 7233
May 14, 2022 2:06:22 AM io.grpc.internal.SerializingExecutor run
SEVERE: Exception while executing runnable io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed@6bb8cba3
java.lang.RuntimeException: Generated message class "io.temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure" missing method "getStartRequestId".
at com.google.protobuf.GeneratedMessageV3.getMethodOrDie(GeneratedMessageV3.java:1847)
at com.google.protobuf.GeneratedMessageV3.access$1000(GeneratedMessageV3.java:79)
at com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$SingularFieldAccessor$ReflectionInvoker.<init>(GeneratedMessageV3.java:2176)
at com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$SingularFieldAccessor.<init>(GeneratedMessageV3.java:2248)
at com.google.protobuf.GeneratedMessageV3$FieldAccessorTable$SingularStringFieldAccessor.<init>(GeneratedMessageV3.java:2916)
at com.google.protobuf.GeneratedMessageV3$FieldAccessorTable.ensureFieldAccessorsInitialized(GeneratedMessageV3.java:1977)
at io.temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure.internalGetFieldAccessorTable(WorkflowExecutionAlreadyStartedFailure.java:93)
at com.google.protobuf.GeneratedMessageV3.getDescriptorForType(GeneratedMessageV3.java:133)
at com.google.protobuf.Any.pack(Any.java:183)
at io.temporal.serviceclient.StatusUtils.newException(StatusUtils.java:82)
at io.temporal.internal.testservice.TestWorkflowService.throwDuplicatedWorkflow(TestWorkflowService.java:286)
at io.temporal.internal.testservice.TestWorkflowService.startWorkflowExecutionImpl(TestWorkflowService.java:231)
at io.temporal.internal.testservice.TestWorkflowService.startWorkflowExecution(TestWorkflowService.java:204)
at io.temporal.api.workflowservice.v1.WorkflowServiceGrpc$MethodHandlers.invoke(WorkflowServiceGrpc.java:3822)
at io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(ServerCalls.java:182)
at io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(ServerCallImpl.java:340)
at io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(ServerImpl.java:866)
at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37)
at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.lang.Thread.run(Thread.java:833)
at com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine(PlatformThreads.java:704)
at com.oracle.svm.core.windows.WindowsPlatformThreads.osThreadStartRoutine(WindowsPlatformThreads.java:143)
Caused by: java.lang.NoSuchMethodException: io.temporal.api.errordetails.v1.WorkflowExecutionAlreadyStartedFailure.getStartRequestId()
at java.lang.Class.getMethod(DynamicHub.java:2227)
at com.google.protobuf.GeneratedMessageV3.getMethodOrDie(GeneratedMessageV3.java:1844)
... 23 more