Chris Green created NIFI-5144:
---------------------------------
Summary: TransformXml crashes creating CDATA (Saxon issue?)
Key: NIFI-5144
URL: https://issues.apache.org/jira/browse/NIFI-5144
Project: Apache NiFi
Issue Type: Bug
Affects Versions: 1.6.0
Reporter: Chris Green
Hi all,
I've not submitted a Jira issue before, apologies if this is in the wrong place.
I'm attempting to transform XML containing CDATA sections, into another
structure but keeping the CDATA tags. A 3rd party XML transformer confirms the
XSLT I've got transforms the XML successfully, using xsl:output to specify
which output elements to create as CDATA.
Using the same XML and XSLT in NiFi 1.6.0 causes the following exception:
{{java.lang.IllegalArgumentException: Value of {cdata-section-elements} must be
a list of QNames in '\{uri}local' notation}}
The stack trace (below) mentions the Saxon library, which I've searched for
along with the exception and found the bug detailed
[here|https://saxonica.plan.io/issues/2795].
NiFi 1.6.0 appears to be bundled with Saxon-HE-9.6.0-5.jar, which is a version
from before the bug above was fixed (if they are related).
Full stack trace of the issue:
{{2018-05-01 09:01:18,861 ERROR [Timer-Driven Process Thread-2]
o.a.n.processors.standard.TransformXml
TransformXml[id=0ad735f3-2234-127c-0000-000038e8a135] Unable to transform
StandardFlowFileRecord[uuid=3054a4e2-b70a-4a22-8699-8dac755ebbaa,claim=StandardContentClaim
[resourceClaim=StandardResourceClaim[id=1525097440980-1,
container=stgkazoofi02_content1, section=1], offset=146962,
length=6091],offset=0,name=28527_58_20180428.xml,size=6091] due to
org.apache.nifi.processor.exception.ProcessException: IOException thrown from
TransformXml[id=0ad735f3-2234-127c-0000-000038e8a135]: java.io.IOException:
java.lang.IllegalArgumentException: Value of {cdata-section-elements} must be a
list of QNames in '\{uri}local' notation:
org.apache.nifi.processor.exception.ProcessException: IOException thrown from
TransformXml[id=0ad735f3-2234-127c-0000-000038e8a135]: java.io.IOException:
java.lang.IllegalArgumentException: Value of {cdata-section-elements} must be a
list of QNames in '\{uri}local' notation}}
{{org.apache.nifi.processor.exception.ProcessException: IOException thrown from
TransformXml[id=0ad735f3-2234-127c-0000-000038e8a135]: java.io.IOException:
java.lang.IllegalArgumentException: Value of {cdata-section-elements} must be a
list of QNames in '\{uri}local' notation}}
{{at
org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2902)}}
{{at
org.apache.nifi.processors.standard.TransformXml.onTrigger(TransformXml.java:234)}}
{{at
org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)}}
{{at
org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1147)}}
{{at
org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:175)}}
{{at
org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:117)}}
{{at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)}}
{{at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)}}
{{at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)}}
{{at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)}}
{{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)}}
{{Caused by: java.io.IOException: java.lang.IllegalArgumentException: Value of
{cdata-section-elements} must be a list of QNames in '\{uri}local' notation}}
{{at
org.apache.nifi.processors.standard.TransformXml$2.process(TransformXml.java:261)}}
{{at
org.apache.nifi.controller.repository.StandardProcessSession.write(StandardProcessSession.java:2881)}}
{{... 12 common frames omitted}}
{{Caused by: java.lang.IllegalArgumentException: Value of
{cdata-section-elements} must be a list of QNames in '\{uri}local' notation}}
{{at net.sf.saxon.s9api.Serializer.setOutputProperty(Serializer.java:408)}}
{{at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:138)}}
{{at
org.apache.nifi.processors.standard.TransformXml$2.process(TransformXml.java:259)}}
{{... 13 common frames omitted}}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)