Created on 12-19-2016 09:48 AM - edited 08-18-2019 04:49 AM
Hi,
I have implemented custom processor in nifi and used DBService connection pool in the processor. I have built it and put .nar file into lib folder of nifi.
When I am creating new DB connection pool then its working fine but when I am using another built in processor or another custom processor along with this where DB connection is required then it gives some errors. It doesn't fetch the connection. For example I have created 1 processor 'ThreatRawProcessor' and using DB connection for the operation and I am using 1 build in processor 'ExecuteSQL' along with custom processor for select the record from table. But the issue is that only cutom processor is able to fetch & use the DB connection but another processors are not able to fetch the connection. Please find the screenshot for the same :
CutomProcessor's Configuration :
Execute SQL Configuration :
Error Message :
Code where connection pool is used : Kindly check the below link for screenshot.
https://postimg.org/image/8l6vb3xhl/
Kindly help me how to resolve this error & I can get the connection in other processor's also.
Thanks in Advance.
Regards,
Ankit
Created 03-10-2017 04:35 PM
I resolved this issue. This issue occurs when nifi custom processor uses any inbuilt controller service so that custom processor should contain the service API in the custom nar file and for that we have to add dependency in the nar project's pom.xml file. Add the following dependency in the pom.xml file of nar project :
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-services-api-nar</artifactId>
<version>1.1.1</version>
<type>nar</type>
</dependency>
Note : change version according to your nifi version.
Add these lines and the issue will be resolved.
Created 03-10-2017 10:53 AM
Hi, I have the same issue. Did you find any solution to it? @Ankit Garg @Matt Burgess
Created 03-10-2017 11:20 AM
Created 03-10-2017 12:41 PM
hi, I have attached my pom file and java code. If you need any more details let me know. @Ankit Garg
Created 03-10-2017 04:24 PM
Hi, You didn't share nar project's pom.xml file. Please share nar project's pom file.
Created 03-11-2017 02:33 AM
Hi, please check the answer I posted.
Created 03-10-2017 04:35 PM
I resolved this issue. This issue occurs when nifi custom processor uses any inbuilt controller service so that custom processor should contain the service API in the custom nar file and for that we have to add dependency in the nar project's pom.xml file. Add the following dependency in the pom.xml file of nar project :
<dependency>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-standard-services-api-nar</artifactId>
<version>1.1.1</version>
<type>nar</type>
</dependency>
Note : change version according to your nifi version.
Add these lines and the issue will be resolved.
Created on 03-13-2017 11:00 AM - edited 08-18-2019 04:49 AM
Hi Ankit,
I added the dependency as you had instructed but now I am getting error in the same line of pom file
which says "Project build error: 'dependencies.dependency.groupId' for null:nifi-standard-services-api-nar:nar is missing."
I have added a screenshot of the same. Kindly Help me out. @Ankit Garg
Created 03-14-2017 11:39 AM
Created 03-14-2017 12:56 PM
Thanks a lot. It worked for me. Thanks for your help. 🙂