You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/11/10 13:20:58 UTC
[jira] [Commented] (BROOKLYN-383) REST api serialization of sensor
value that is a Task can cause StackOveflowError
[ https://issues.apache.org/jira/browse/BROOKLYN-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15654023#comment-15654023 ]
ASF GitHub Bot commented on BROOKLYN-383:
-----------------------------------------
GitHub user aledsage opened a pull request:
https://github.com/apache/brooklyn-server/pull/424
BROOKLYN-383: fix json serialisation of tasks
* Also do the same for policies, enrichers and feeds.
* Adds AbstractEntityAdjunct.getEntity() to make that easier.
* Adds TestEntity.sleepEffector
And tests xml persistence of a task, while I'm at it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aledsage/brooklyn-server BROOKLYN-383
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/brooklyn-server/pull/424.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #424
----
commit d3720c9a6038f3bcd9addeb6404df32667cfb44d
Author: Aled Sage <al...@gmail.com>
Date: 2016-11-10T13:18:43Z
BROOKLYN-383: fix json serialisation of tasks
* Also do the same for policies, enrichers and feeds.
* Adds AbstractEntityAdjunct.getEntity() to make that easier.
* Adds TestEntity.sleepEffector
commit 7d0bb562cd5332a7cf0bac8c0f00fbe728d1861a
Author: Aled Sage <al...@gmail.com>
Date: 2016-11-10T13:19:16Z
Test XML persistence of task
----
> 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)