I have the following EvaluateJsonPath processor which creates some new attributes for every flow file -
Going forward, the attributes store some string values (which may contain spaces/special characters).
I want to pass these attributes (for every flowfile in queue respectively) to an ExecuteStreamCommand processor running an R script at the backend.
Handling arguments in R script -(see attachment)
But every time an invalid null character error is encountered as below -
2017-07-25 19:06:33,530 ERROR [Timer-Driven Process Thread-6] o.a.n.p.standard.ExecuteStreamCommand ExecuteStreamCommand[id=7912c788-015d-1000-b1aa-73e854d7b33a] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: java.io.IOException: invalid null character in command: {}
org.apache.nifi.processor.exception.ProcessException: java.io.IOException: invalid null character in command
at org.apache.nifi.processors.standard.ExecuteStreamCommand.onTrigger(ExecuteStreamCommand.java:339)
at org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
at org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1120)
at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:147)
at org.apache.nifi.controller.tasks.ContinuallyRunProcessorTask.call(ContinuallyRunProcessorTask.java:47)
at org.apache.nifi.controller.scheduling.TimerDrivenSchedulingAgent$1.run(TimerDrivenSchedulingAgent.java:132)
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:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.IOException: invalid null character in command
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1024)
at org.apache.nifi.processors.standard.ExecuteStreamCommand.onTrigger(ExecuteStreamCommand.java:336)
... 12 common frames omitted
How to resolve the same?
Attachments:
evaluatejsonpath.jpg
executecommand.jpg
rscript.jpg