I am trying to run a python script in a NiFi ExecuteScript processor. This script uses the ldap3 library from: https://pypi.org/project/ldap3/. I am aware that the processor runs Jython, and that I am unable to use compiled code, .so
files, etc. but I noted that the library claims to be:
A strictly RFC 4510 conforming LDAP V3 pure Python client library
I have defined the path to the folder containing the library in the processor's PROPERTIES tab, using
Script Engine : python
Script File : /mnt/path_to_my_scripts/run.py
Script Body :
Module Directory : /mnt/path_to_my_libs
...where the ldap3 library folder is:
/mnt/path_to_my_libs/ldap3
When I start the processor I get the following error message:
16:17:32 GMT - server.my.domain:9091 - ERROR ExecuteScript[id=xxxx] Failed to process session due to org.apache.nifi.processor.exception.ProcessException: javax.lang.NoClassDefFoundError: org/scijava/jython/shaded/javax/xml/bind/DatatypeConverter in at line number 5: javax.script.ScriptException: javax.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/scijava/jython/shaded/javax/xml/bind/DatatypeConverter in at line number 5
Sure enough, line number 5 in the scipt is:
import ldap3
I have other scripts running successfully which do not use ldap3.