Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HelloException sample fails on Windows #16

Open
khaale opened this issue Jul 10, 2019 · 1 comment
Open

HelloException sample fails on Windows #16

khaale opened this issue Jul 10, 2019 · 1 comment

Comments

@khaale
Copy link

khaale commented Jul 10, 2019

HelloException fails on Windows platform with the following stacktrace

Exception in thread "main" com.uber.cadence.converter.DataConverterException: when parsing:"{"workflowExecution":{"workflowId":"ba15f8ca-160d-3e37-a53a-ea0a055e874f","runId":"98124ba6-1d8b-404f-a64c-21764b345be6"},"workflowType":{"n
ame":"GreetingChild::composeGreeting"},"eventId":10,"detailMessage":"when parsing:\"{\"activityType\":{\"name\":\"G" into following types: [class com.uber.cadence.workflow.ChildWorkflowFailureException]
        at com.uber.cadence.converter.JsonDataConverter.fromData(JsonDataConverter.java:163)
        at com.uber.cadence.internal.sync.WorkflowStubImpl.mapToWorkflowFailureException(WorkflowStubImpl.java:263)
        at com.uber.cadence.internal.sync.WorkflowStubImpl.getResult(WorkflowStubImpl.java:194)
        at com.uber.cadence.internal.sync.WorkflowStubImpl.getResult(WorkflowStubImpl.java:162)
        at com.uber.cadence.internal.sync.WorkflowInvocationHandler.startWorkflow(WorkflowInvocationHandler.java:246)
        at com.uber.cadence.internal.sync.WorkflowInvocationHandler.invoke(WorkflowInvocationHandler.java:183)
        at com.sun.proxy.$Proxy3.getGreeting(Unknown Source)
        at com.uber.cadence.samples.hello.HelloException.main(HelloException.java:177)
Caused by: java.lang.NullPointerException: stackTrace[0]
        at java.base/java.lang.Throwable.setStackTrace(Unknown Source)
        at com.uber.cadence.converter.JsonDataConverter$ThrowableTypeAdapterFactory$3.read(JsonDataConverter.java:334)
        at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
        at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:285)
        at com.uber.cadence.converter.JsonDataConverter$ThrowableTypeAdapterFactory$3.read(JsonDataConverter.java:333)
        at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:131)
        at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:222)
        at com.google.gson.TypeAdapter.fromJsonTree(TypeAdapter.java:285)
        at com.uber.cadence.converter.JsonDataConverter$ThrowableTypeAdapterFactory$3.read(JsonDataConverter.java:333)
        at com.google.gson.TypeAdapter$1.read(TypeAdapter.java:199)
        at com.google.gson.Gson.fromJson(Gson.java:927)
        at com.google.gson.Gson.fromJson(Gson.java:892)
        at com.google.gson.Gson.fromJson(Gson.java:841)
        at com.uber.cadence.converter.JsonDataConverter.fromData(JsonDataConverter.java:161)
        ... 7 more

@khaale
Copy link
Author

khaale commented Jul 10, 2019

It looks like the issue was caused by platform-inconsistent custom stacktrace serialization/deserialization at currently referenced 2.2.0 java client version (fixed by uber/cadence-java-client#291) . Locally I've fixed it bumping client version to 2.5.0.
Does it make sense to bump it here too?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant