Hello, I am trying to deploy CogStack-Nifi using part of one of the example workflows. As I am doing this on a personal laptop I am just trying to spin up the samples-db, nifi, and nifi-nginx services to start with.
When I come to configuring and enabling the DBCPConnectionPool-MTSamples for the database service (described in the docs here) I am getting the following error:
2023-07-11 09:54:12 2023-07-11 09:54:12,482 ERROR [Timer-Driven Process Thread-10] o.a.n.c.s.StandardControllerServiceNode StandardControllerServiceNode[service=DBCPConnectionPool[id=e19cfe3a-64f9-3516-bbc6-b122f0074bd0], name=DBCPConnectionPool-MTSamples, active=true] Failed to invoke @OnEnabled method
2023-07-11 09:54:12 org.apache.nifi.processor.exception.ProcessException: Driver class org.postgresql.Driver is not found
Is there another service I need to have deployed to work with the database? I pulled cogstacksystems/cogstack-nifi:latest this morning so that should be up to date.
Make sure you pull the latest version of the repository. After that, delete the current NiFi container + associated volume(s), restart it. Navigate to the DBCPConnectionPool controller service and try to verify controller by clicking the “verify” button the top right corner of the properties screen. If it still can’t find/load the file, exit the properties screen and enable the controller anyway. Try starting the processor after and see if it still throws the errors.
Thank you for your reply. I tried deleting and recreating the NiFi container and the advice you added to the documentation. When I ran jar -tvf ./nifi/drivers/postgresql-42.6.0.jar to check the JAR file integrity I got:
java.util.zip.ZipException: invalid END header (bad central directory offset)
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1621)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1512)
...
I suppose that means there is something wrong with my JAR files? Do you know how to fix those?
If it helps I’m working on a Mac and using openjdk v20.0.1.