Created 04-16-2020 02:17 PM
This seems to be an issue for many but I didn't see much in light for Linux systems.
I've done it all picked up the drivers from https://jdbc.postgresql.org/download.html
placed these drives in the nifi-1.11.4/lib/ folder.
I've restarted Nifi, verified the database, verified the filepath, altered the path name with "file:///", altered the path to say just lib/postgresql-42.2.12.jar, attempted to use another database user. I know that the connection information is correct because I connected to the DataGrip UI. I'm completely stumped.
Database Connection URL jdbc:postgresql://localhost:5432/forestdb
Database Driver Class Name org/postgresql/Driver.class
Database Driver Location(s) /home/fg/Documents/nifi-1.11.4-bin/nifi-1.11.4/lib/postgresql-42.2.12.jar
Database User admin
Password 123
Max Wait Time 500 millis
16:03:08 CDT
ERROR
01711097-9fd7-1476-e26e-a9bf77b2dff7
StandardControllerServiceNode[service=DBCPConnectionPool[id=01711097-9fd7-1476-e26e-a9bf77b2dff7], versionedComponentId=null, processGroup=StandardProcessGroup[identifier=6428af02-0171-1000-124e-9aeed8d62c82], active=true] Failed to invoke @OnEnabled method due to org.apache.nifi.reporting.InitializationException: Can't load Database Driver: Can't load Database Drive
Created on 04-17-2020 08:11 AM - edited 04-17-2020 08:16 AM
In order to solve this problem I did the following:
Added one of the postgres drives (https://jdbc.postgresql.org/download.html)
to the nifi-1.11.4/lib/ folder I also added the file to a secondary folder within lib call /java11.
I safely shut down nifi and restarted my linux system.
I updated my DBCPConnectionPool to say the follow:
Database Connection URL jdbc:postgresql:///forestdb
Database Driver Class Name org.postgresql.Driver
Database Driver Location(s) No value set
Kerberos Credentials Service No value set
Database User admin
Password 123
Max Wait Time 500 millis
Max Total Connections 8
Be sure you have your tables set up and all that good stuff.
Notice that I no longer included the path to the drivers locations. This should be due to Nifi loading the jar files into the system itself, by us adding it to the nifi-1.11.4/lib folder.
Adding the file to both the nifi-1.11.4/lib folder and the nifi-1.11.4/lib/java11 folder is probably not necessary but i was troubleshooting.
also note that I changed the Database Connection URL, no longer having localhost as part of the url.
Created on 04-17-2020 08:11 AM - edited 04-17-2020 08:16 AM
In order to solve this problem I did the following:
Added one of the postgres drives (https://jdbc.postgresql.org/download.html)
to the nifi-1.11.4/lib/ folder I also added the file to a secondary folder within lib call /java11.
I safely shut down nifi and restarted my linux system.
I updated my DBCPConnectionPool to say the follow:
Database Connection URL jdbc:postgresql:///forestdb
Database Driver Class Name org.postgresql.Driver
Database Driver Location(s) No value set
Kerberos Credentials Service No value set
Database User admin
Password 123
Max Wait Time 500 millis
Max Total Connections 8
Be sure you have your tables set up and all that good stuff.
Notice that I no longer included the path to the drivers locations. This should be due to Nifi loading the jar files into the system itself, by us adding it to the nifi-1.11.4/lib folder.
Adding the file to both the nifi-1.11.4/lib folder and the nifi-1.11.4/lib/java11 folder is probably not necessary but i was troubleshooting.
also note that I changed the Database Connection URL, no longer having localhost as part of the url.