client version 1.8.8
[pool-1-thread-1] ERROR com.netflix.conductor.client.task.WorkflowTaskCoordinator - Error when polling for tasks
java.lang.RuntimeException: com.sun.jersey.api.client.ClientHandlerException: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@1c8f5fc; line: 1, column: 1]
at com.netflix.conductor.client.http.ClientBase.handleException(ClientBase.java:198)
at com.netflix.conductor.client.http.ClientBase.getForEntity(ClientBase.java:182)
at com.netflix.conductor.client.http.TaskClient.batchPollTasksInDomain(TaskClient.java:161)
at com.netflix.conductor.client.task.WorkflowTaskCoordinator.pollForTask(WorkflowTaskCoordinator.java:300)
at com.netflix.conductor.client.task.WorkflowTaskCoordinator.lambda$null$1(WorkflowTaskCoordinator.java:268)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.sun.jersey.api.client.ClientHandlerException: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@1c8f5fc; line: 1, column: 1]
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:644)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:604)
at com.netflix.conductor.client.http.ClientBase.getForEntity(ClientBase.java:180)
... 10 more
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token
at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@1c8f5fc; line: 1, column: 1]
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:270)
at com.fasterxml.jackson.databind.DeserializationContext.reportMappingException(DeserializationContext.java:1234)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1122)
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1075)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.handleNonArray(CollectionDeserializer.java:338)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:269)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:259)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1583)
at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:964)
at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:808)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:634)
... 12 more
@juaby ,
What's the use case that gives your the above error ?
Probably, you need to take Array instead of object form to update task/workflow.
So it starts with "[ { }, { },..........]".
env : version 1.8.8, db=mysql
long time running, it will appear
This reproduces for me as well when I'm trying to push a new task definition to endpoint /api/metadata/taskdefs
I used the one from the documentation itself:
body:
{
"name": "encode_task",
"retryCount": 3,
"timeoutSeconds": 1200,
"inputKeys": [
"sourceRequestId",
"qcElementType"
],
"outputKeys": [
"state",
"skipped",
"result"
],
"timeoutPolicy": "TIME_OUT_WF",
"retryLogic": "FIXED",
"retryDelaySeconds": 600,
"responseTimeoutSeconds": 3600
}
edit: Ok I figured it out. I didn't wrap my task with array [].. probably you had the same issue
ths
Most helpful comment
This reproduces for me as well when I'm trying to push a new task definition to endpoint /api/metadata/taskdefs
I used the one from the documentation itself:
body:
edit: Ok I figured it out. I didn't wrap my task with array [].. probably you had the same issue