Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-10559

JDBC via Minion fails to find 3rd party classes

    XMLWordPrintable

    Details

    • Sprint:
      Horizon - Feb 20th 2019, Horizon - Feb 27th 2019, Horizon - March 6th 2019

      Description

      All three of org.opennms.features.jdbc-collector, org.opennms.opennms-detector-jdbc, and org.opennms.features.poller.monitors.core fail to load third party classes for JDBC.

      It was my understanding that with the fix in NMS-9829, adding the 3rd party jars to $MINION_HOME/lib, and adding the classes to

      org.osgi.framework.system.packages.extra

      would be sufficient for loading jdbc driver classes in the minion. However, instead we receive:

      2019-02-08T20:36:28,016 | ERROR | pool-44-thread-4 | BasicDetector                    | 316 - org.opennms.opennms-provision-api - 23.0.2 | isServiceDetected: JDBC: Unexpected error trying to detect JDBC on address x.x.x.x port 3306
      java.lang.ClassNotFoundException: com.mysql.jdbc.Driver not found by org.opennms.opennms-detector-jdbc [301]
              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639) [?:?]
              at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) [?:?]
              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) [?:?]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [?:?]
              at java.lang.Class.forName0(Native Method) ~[?:?]
              at java.lang.Class.forName(Class.java:264) [?:?]
              at org.opennms.netmgt.provision.detector.jdbc.client.JDBCClient.connect(JDBCClient.java:81) [301:org.opennms.opennms-detector-jdbc:23.0.2]
              at org.opennms.netmgt.provision.support.BasicDetector.isServiceDetected(BasicDetector.java:91) [316:org.opennms.opennms-provision-api:23.0.2]
              at org.opennms.netmgt.provision.support.SyncAbstractDetector.detect(SyncAbstractDetector.java:76) [316:org.opennms.opennms-provision-api:23.0.2]
              at org.opennms.netmgt.provision.detector.client.rpc.DetectorClientRpcModule$1.get(DetectorClientRpcModule.java:89) [308:org.opennms.opennms-detectorclient-rpc:23.0.2]
              at org.opennms.netmgt.provision.detector.client.rpc.DetectorClientRpcModule$1.get(DetectorClientRpcModule.java:85) [308:org.opennms.opennms-detectorclient-rpc:23.0.2]
              at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) [?:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
              at java.lang.Thread.run(Thread.java:748) [?:?]
      2019-02-08T20:36:28,016 | INFO  | pool-44-thread-4 | JDBCClient                       | 301 - org.opennms.opennms-detector-jdbc - 23.0.2 | connecting to JDBC on /10.21.24.190
      2019-02-08T20:36:28,017 | ERROR | pool-44-thread-4 | BasicDetector                    | 316 - org.opennms.opennms-provision-api - 23.0.2 | isServiceDetected: JDBC: Unexpected error trying to detect JDBC on address x.x.x.x port 3306
      java.lang.ClassNotFoundException: com.mysql.jdbc.Driver not found by org.opennms.opennms-detector-jdbc [301]
              at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639) [?:?]
              at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) [?:?]
              at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) [?:?]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357) [?:?]
              at java.lang.Class.forName0(Native Method) ~[?:?]
              at java.lang.Class.forName(Class.java:264) [?:?]
              at org.opennms.netmgt.provision.detector.jdbc.client.JDBCClient.connect(JDBCClient.java:81) [301:org.opennms.opennms-detector-jdbc:23.0.2]
              at org.opennms.netmgt.provision.support.BasicDetector.isServiceDetected(BasicDetector.java:91) [316:org.opennms.opennms-provision-api:23.0.2]
              at org.opennms.netmgt.provision.support.SyncAbstractDetector.detect(SyncAbstractDetector.java:76) [316:org.opennms.opennms-provision-api:23.0.2]
              at org.opennms.netmgt.provision.detector.client.rpc.DetectorClientRpcModule$1.get(DetectorClientRpcModule.java:89) [308:org.opennms.opennms-detectorclient-rpc:23.0.2]
              at org.opennms.netmgt.provision.detector.client.rpc.DetectorClientRpcModule$1.get(DetectorClientRpcModule.java:85) [308:org.opennms.opennms-detectorclient-rpc:23.0.2]
              at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) [?:?]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
              at java.lang.Thread.run(Thread.java:748) [?:?]
      

        Attachments

          Activity

            People

            • Assignee:
              cgorantla Chandra Gorantla
              Reporter:
              dino2gnt Dino Yancey
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: