Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Saxparser2 not found: upgrade nifi 1.1 to nifi 1.5

avatar
New Contributor

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?


1 ACCEPTED SOLUTION

avatar
Super Mentor

@walid hfaiedh

@mina kh

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.

View solution in original post

3 REPLIES 3

avatar
New Contributor

I have the same problem,
did you find any work-around?

avatar
Super Mentor

@walid hfaiedh

@mina kh

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.

avatar
New Contributor

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.