Support Questions

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

'Database Connection Pooling Service' validated against '' is invalid because invalid controller service

avatar

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 :

10493-flow.png

CutomProcessor's Configuration :

10494-custom-processor-config.png

Execute SQL Configuration :

10495-executesql-config.png

10496-connection-error.png

Error Message :

10497-error.png

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

1 ACCEPTED SOLUTION

avatar

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.

View solution in original post

9 REPLIES 9

avatar
Contributor

Hi, I have the same issue. Did you find any solution to it? @Ankit Garg @Matt Burgess

avatar

@aishwarya srivastava

Hi, Yes I resolved the issue. Could you please show me your pom.xml file of your processor and nar project ?

avatar
Contributor

hi, I have attached my pom file and java code. If you need any more details let me know. @Ankit Garg

myprocessor.txt pom.xml

avatar

Hi, You didn't share nar project's pom.xml file. Please share nar project's pom file.

avatar

Hi, please check the answer I posted.

avatar

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.

avatar
Contributor

Hi Ankit,

I added the dependency as you had instructed but now I am getting error in the same line of pom file

13565-projectbuilderror.png

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

avatar

@aishwarya srivastava

Please add below line :

<groupId>org.apache.nifi</groupId>

avatar
Contributor

Thanks a lot. It worked for me. Thanks for your help. 🙂