[
https://issues.apache.org/jira/browse/NIFI-1189?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15012003#comment-15012003
]
Aldrin Piri commented on NIFI-1189:
-----------------------------------
Did a cursory scan over this with the provided expression. The issue seems to
be in the validator which is an adaptation of the JsonPath library's
PathCompiler and seems to be a bug in their logic.
For the version NiFi is using, the problematic area is Lns. 110-115 in
PathCompiler
{code}
case PERIOD:
i++;
if (path.charAt(i) == PERIOD) {
//This is a deep scan
fragment = "..";
i++;
{code}
This seems to be corrected at
https://github.com/jayway/JsonPath/blob/master/json-path/src/main/java/com/jayway/jsonpath/internal/PathCompiler.java
(more specifically, the way in which this logic is carried out has been
transformed) but at this time there are not currently any new releases.
> SplitJSON validation check fails in a weird way
> -----------------------------------------------
>
> Key: NIFI-1189
> URL: https://issues.apache.org/jira/browse/NIFI-1189
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Joseph Percivall
> Priority: Minor
>
> I am attempting to use SplitJSON to extract the controller status elements
> received by "Get"ing http://localhost:8080/nifi-api/controller/status. The
> JSONPath needed for this should be "$.controllerStatus." and has been tested
> correct using this site [1] and data [2].
> When I attempt to set that as the JSONPath expression the processor is marked
> invalid with this explanation:
> " is invalid because Failed to run validation due to
> java.lang.StringOutOfBoundsException: String index out of range: 19
> [1] https://jsonpath.curiousconcept.com/
> [2]
> {"revision":{"clientId":"6584c7eb-b84b-4d0a-85e3-2f41e92a02bc"},"controllerStatus":{"activeThreadCount":0,"queued":"0
> / 0
> bytes","hasPendingAccounts":false,"runningCount":0,"stoppedCount":5,"invalidCount":1,"disabledCount":0,"activeRemotePortCount":0,"inactiveRemotePortCount":0,"bulletins":[],"controllerServiceBulletins":[],"reportingTaskBulletins":[]}}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)