PostgreSQL jdbc detector fails with: java.lang.ClassNotFoundException: org.postgresql.Driver not found

Description

I'm was running into a problem trying to get a minion to detect, and poll, a postgresql database. Specifically, I was seeing the following in the logs:

My detector is setup like so:

Additionally, I found the following in `karaf.log`:

However, I found that by adding an Import-Package: org.postgresql;resolution:=optional section to the MANIFEST.MF of the opennms-detector-jdbc jar, I was able to get it working. 

 

P.s. Thanks to Jesse (from chat) for pointing out that postgresql wasn't being made available for import by the above class.

Environment

CentOS 7 running inside of VMware ESXi 6.5

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Chandra Gorantla March 14, 2018 at 3:36 PM
Edited

Fixed

Details

Assignee

Reporter

Labels

Components

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created January 23, 2018 at 9:36 PM
Updated March 14, 2018 at 3:38 PM
Resolved March 14, 2018 at 3:38 PM