[
https://issues.apache.org/jira/browse/NIFI-7806?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vesa Sokka updated NIFI-7806:
-----------------------------
Description:
When attempting to validate XML with nested array of records, we get the
following error:
DEBUG [Timer-Driven Process Thread-2] o.a.n.processors.standard.ValidateRecord
ValidateRecord[id=01751002-a9fd-11b5-a009-202ad2f46ac0] For
StandardFlowFileRecord[uuid=8d6901d8-e165-461d-a35b-7a35d5b55a0d,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1602234716692-101135,
container=default, section=783], offset=474738,
length=516],offset=0,name=8d6901d8-e165-461d-a35b-7a35d5b55a0d,size=516]
*Record #1 is invalid due to:*
*MapRecord[{item=MapRecord[*
*
{DESCRIPTION=Failed with one item, VALUE=xyz}
*
]}] is not a valid value for /VALUES: Value is of type
org.apache.nifi.serialization.record.MapRecord but was expected to be of type
RECORD
Template that reproduces the error is attached. Also Schema and Example xml
attatched. First element of XML is transferred to INVALID while second one is
transferred to VALID
was:
When attempting to validate XML with nested array of records, we get the
following error:
DEBUG [Timer-Driven Process Thread-2] o.a.n.processors.standard.ValidateRecord
ValidateRecord[id=01751002-a9fd-11b5-a009-202ad2f46ac0] For
StandardFlowFileRecord[uuid=8d6901d8-e165-461d-a35b-7a35d5b55a0d,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1602234716692-101135,
container=default, section=783], offset=474738,
length=516],offset=0,name=8d6901d8-e165-461d-a35b-7a35d5b55a0d,size=516]
*Record #1 is invalid due to:*
*MapRecord[{item=MapRecord[*
*{DESCRIPTION=Failed with one item, VALUE=xyz}*
]}] is not a valid value for /VALUES: Value is of type
org.apache.nifi.serialization.record.MapRecord but was expected to be of type
RECORD
Template that reproduces the error is attached
Here's an example XML; First item fails, second is success
<xml>
<ELEMENTS xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<VALUES>
<item>
<DESCRIPTION>Failed with one item</DESCRIPTION>
<VALUE>xyz</VALUE>
</item>
</VALUES>
</ELEMENTS>
<ELEMENTS xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
<VALUES>
<item>
<DESCRIPTION>this element is successfull</DESCRIPTION>
<VALUE>value</VALUE>
</item>
<item>
<DESCRIPTION>when another item is added</DESCRIPTION>
<VALUE>value</VALUE>
</item>
</VALUES>
</ELEMENTS>
</xml>
schema
> ValidateRecord does not handle XML with nested array of records correctly
> -------------------------------------------------------------------------
>
> Key: NIFI-7806
> URL: https://issues.apache.org/jira/browse/NIFI-7806
> Project: Apache NiFi
> Issue Type: Bug
> Reporter: Vesa Sokka
> Priority: Major
> Attachments: Example_flow.xml
>
>
> When attempting to validate XML with nested array of records, we get the
> following error:
>
> DEBUG [Timer-Driven Process Thread-2]
> o.a.n.processors.standard.ValidateRecord
> ValidateRecord[id=01751002-a9fd-11b5-a009-202ad2f46ac0] For
> StandardFlowFileRecord[uuid=8d6901d8-e165-461d-a35b-7a35d5b55a0d,claim=StandardContentClaim
> [resourceClaim=StandardResourceClaim[id=1602234716692-101135,
> container=default, section=783], offset=474738,
> length=516],offset=0,name=8d6901d8-e165-461d-a35b-7a35d5b55a0d,size=516]
> *Record #1 is invalid due to:*
> *MapRecord[{item=MapRecord[*
> *
> {DESCRIPTION=Failed with one item, VALUE=xyz}
> *
> ]}] is not a valid value for /VALUES: Value is of type
> org.apache.nifi.serialization.record.MapRecord but was expected to be of type
> RECORD
>
> Template that reproduces the error is attached. Also Schema and Example xml
> attatched. First element of XML is transferred to INVALID while second one is
> transferred to VALID
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)