Created 09-20-2018 01:14 PM
capture-error-executescript.pngI have a script python that is executed to parse xml and do some operations to the data extracted from an xml file. This script is executed by the ExecuteScript processor. I has been working correctly with nifi 1.1. But after upgrading to nifi 1.5, an error was occured because of jython-shaded-2.7.1.jar which eventually contains the SAXParser 2. In nifi 1.1, the jython used is the jython-standalone-2.7.0.jar.
Please, can anyone tell me how to fix this problem?
Created 10-09-2018 02:58 PM
As you noted there was a change between NiFi 1.1. and NiFi 1.5 in the jython jar being used. This change was made to address https://issues.apache.org/jira/browse/NIFI-4301. As result the SAXParser your script used in NiFi 1.1 is no longer available.
-
The following Apache Jira was opened to address this issue:
https://issues.apache.org/jira/browse/NIFI-5650
-
Possible alternatives solution in mean time:
1. Rewrite your script in groovy
2. If script still executes fine via command line from the NiFi server, try using ExecuteStreamCommand processor instead for now. (this may not be an option depending on nature of your jython script)
3. Swap out the scripting nar provided in NiFi 1.5 with the scripting nar from NiFi 1.1 until above issue is addressed.
-
Thank you,
Matt
-
If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.
Created 10-09-2018 02:31 PM
I have the same problem,
did you find any work-around?
Created 10-09-2018 02:58 PM
As you noted there was a change between NiFi 1.1. and NiFi 1.5 in the jython jar being used. This change was made to address https://issues.apache.org/jira/browse/NIFI-4301. As result the SAXParser your script used in NiFi 1.1 is no longer available.
-
The following Apache Jira was opened to address this issue:
https://issues.apache.org/jira/browse/NIFI-5650
-
Possible alternatives solution in mean time:
1. Rewrite your script in groovy
2. If script still executes fine via command line from the NiFi server, try using ExecuteStreamCommand processor instead for now. (this may not be an option depending on nature of your jython script)
3. Swap out the scripting nar provided in NiFi 1.5 with the scripting nar from NiFi 1.1 until above issue is addressed.
-
Thank you,
Matt
-
If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link.
Created 10-23-2018 08:10 AM
Thank you Matt,
I solved this problem by rewriting the script with Groovy.
An other way to fix this problem has been proposed by a hortonworks nifi expert who developped a new patch of jython (which i have tested it), but this solution is under approval process by the hortonworks support.