brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-383) REST api serialization of sensor value that is a Task can cause StackOveflowError
Date Wed, 16 Nov 2016 13:12:58 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15670396#comment-15670396
] 

ASF GitHub Bot commented on BROOKLYN-383:
-----------------------------------------

Github user neykov commented on the issue:

    https://github.com/apache/brooklyn-server/pull/424
  
    Nice one.


> 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
>            Priority: Minor
>
> 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)

Mime
View raw message