[ 
https://issues.apache.org/jira/browse/BROOKLYN-383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aled Sage resolved BROOKLYN-383.
--------------------------------
       Resolution: Fixed
         Assignee: Aled Sage
    Fix Version/s: 0.10.0

> REST api serialization of sensor value that is a Task can cause 
> StackOveflowError
> ---------------------------------------------------------------------------------
>
>                 Key: BROOKLYN-383
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-383
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>            Assignee: Aled Sage
>            Priority: Minor
>             Fix For: 0.10.0
>
>
> In Brooklyn 0.10.0-SNAPSHOT...
> If a sensor value is set to be the value of an uncompleted {{Task}}, and then 
> that sensor value is retrieved over json, it causes problems!
> For example, if it is an effector task, we can get the warning below (with 
> 600K characters on that log line!):
> {noformat}
> 2016-11-10 11:41:30,059 WARN  
> o.a.b.u.c.j.ErrorAndToStringUnknownTypeSerializer [qtp1382493-13]: Standard 
> serialization not possible for class 
> org.apache.brooklyn.util.core.task.DynamicSequentialTask 
> (Task[sleepEffector]@dTJS4pKS)
> com.fasterxml.jackson.databind.JsonMappingException: Infinite recursion 
> (StackOverflowError) (through reference chain: 
> ...
> {noformat}
> For other simpler in-progress tasks, it tries to serialize everything 
> reachable from the task (so we get 251K of serialized state!).
> We should not try to serialize tasks. Instead, we should return a simpler 
> json object that tells us it is a task, gives us the id, and the task's 
> display name.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to