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-538) IllegalArgumentException parsing (null?) json response in http feed
Date Fri, 06 Oct 2017 13:12:00 GMT

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

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

Github user aledsage commented on the issue:

    https://github.com/apache/brooklyn-server/pull/841
  
    Closing this PR - it is linked to from https://issues.apache.org/jira/browse/BROOKLYN-538,
so we can refer back to it if we ever decide to do anything with BROOkLYN-538 other than "won't
fix".


> IllegalArgumentException parsing (null?) json response in http feed
> -------------------------------------------------------------------
>
>                 Key: BROOKLYN-538
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-538
>             Project: Brooklyn
>          Issue Type: Bug
>            Reporter: Aled Sage
>            Assignee: Aled Sage
>            Priority: Minor
>
> I found this exception in my log (using bleeding edge 0.12.0-SNAPSHOT):
> {noformat}
> 2017-09-20T14:44:22,427 WARN  122 o.a.b.c.f.AttributePollHandler [ger-H3hclarI-321] unable
to compute VanillaSoftwareProcessImpl{id=s588wsizik}->Sensor: planeId (java.lang.String);
on val=HttpToolResponse{responseCode=200}
> java.lang.IllegalArgumentException: json can not be null
>         at com.jayway.jsonpath.internal.Utils.notNull(Utils.java:316) [71:com.jayway.jsonpath.json-path:2.4.0]
>         at com.jayway.jsonpath.internal.JsonContext.<init>(JsonContext.java:47)
[71:com.jayway.jsonpath.json-path:2.4.0]
>         at com.jayway.jsonpath.internal.ParseContextImpl.parse(ParseContextImpl.java:38)
[71:com.jayway.jsonpath.json-path:2.4.0]
>         at com.jayway.jsonpath.JsonPath.read(JsonPath.java:502) [71:com.jayway.jsonpath.json-path:2.4.0]
>         at org.apache.brooklyn.feed.http.JsonFunctions$GetPath.apply(JsonFunctions.java:320)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.feed.http.JsonFunctions$GetPath.apply(JsonFunctions.java:310)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at com.google.common.base.Functions$FunctionComposition.apply(Functions.java:216)
[66:com.google.guava:18.0.0]
>         at org.apache.brooklyn.core.feed.AttributePollHandler.transformValueOnSuccess(AttributePollHandler.java:114)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.core.feed.AttributePollHandler.onSuccess(AttributePollHandler.java:101)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.core.feed.DelegatingPollHandler.onSuccess(DelegatingPollHandler.java:51)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.core.feed.Poller$PollJob$1.run(Poller.java:79) [122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.core.feed.Poller$1$1.call(Poller.java:160) [122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.core.feed.Poller$1$1.call(Poller.java:153) [122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.util.core.task.DynamicSequentialTask$DstJob.call(DynamicSequentialTask.java:363)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.util.core.task.BasicExecutionManager$ScheduledTaskCallable$1.call(BasicExecutionManager.java:451)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:529)
[122:org.apache.brooklyn.core:0.12.0.SNAPSHOT]
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
>         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) [?:?]
> {noformat}
> I presume it came from this http feed:
> {noformat}
>         - type: org.apache.brooklyn.core.sensor.http.HttpRequestSensor
>           brooklyn.config:
>             name: planeId
>             period: 5s
>             jsonPath: "$"
>             uri:
>               $brooklyn:formatString:
>               - "%s/v1/server/planeid"
>               - $brooklyn:attributeWhenReady("main.uri.public")
> {noformat}
> My guess is that the api returned {{null}}, but I've not yet tried writing a unit test
to reproduce.
> I'd have expected this to return the json value of {{null}} if that's what the value
is.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message