Hi All,

If I have a custom Controller built for a specific use case, could I use the 
controller in InvokeScriptedProcessor?

I created a custom controller, deployed both api-nar and bundle-nar files, 
restarted nifi and created controller successfully. Also I see necessary 
api.jar and bundle.jar files in bundled-dependencies folder of the unpacked nar 
files in work directory. When I try to import my Service in InvokeScripted 
processor I get the below error. I assumed the dependencies should be available 
immediately to NiFi upon nar deployment and restart but looks like they were 
not available to my processor.

Script1.groovy: 27: unable to resolve class com.test.controller.kudu.KuduService

My controller however got properly created:
[cid:77dc2233-3b8f-4347-ac25-5418b24f97c6]

To solve the issue of my Service Class not being available, I found the 
unpacked jar file and added the dependent jar file (file containing 
com/test/controller/kudu/KuduService) to the ISPs  module directory. This makes 
NiFi's UI crash, except for home page. Please see the screenshots below and 
error from nifi-user.log below.

ISP with my jar file dependency:
[cid:3f9a988f-87e9-4a94-8f55-3d30e41f644d]

UI Crashed:
[cid:f750709b-fe24-44b6-a19b-9f69a3233f95]
I would also see the below log in nifi-user.log

2019-02-19 01:58:08,909 ERROR [NiFi Web Server-21] 
o.a.nifi.web.api.config.ThrowableMapper An unexpected error has occurred: 
java.lang.NullPointerException. Returning Internal Server Error response.
java.lang.NullPointerException: null

Any rookie mistakes experts can see here?

Thank you,
Harsha

Sent from Outlook<http://aka.ms/weboutlook>

Reply via email to