TomRogneby

updated

10 years ago

0

3278

February 8th, 2016 08:00

Oracle JDBC driver location for SRM Oracle SQL collector

Trying to set up the Oracle collector to gather statistics for one of our Oracle DB's.  I've put the Oracle jdbc driver (ojdbc6.jar) into APG/Collecting/SQL-Collector/oracle-database/lib directory, which seems the logical place to put it.  I'm getting the following errors in APG/Collecting/Collector-Manager/oracle-database/logs/collecting-0-0.log when ViPR SRM tries to connect to the database:

SEVERE   -- [2016-02-08 11:01:38 EST] -- AbstractJobExecutor::executeJobRunner(): Error while executing job Oracle-Perf-x-SERVICE-PORT-HOSTNAM-ORACLE0-getinstance removing it from the queue com.watch4net.apg.concurrent.JobExecutionException: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'         at com.watch4net.apg.v2.collector.plugins.sqlcollector.polling.MainCollectorJob.step(MainCollectorJob.java:185)         at com.watch4net.apg.concurrent.executor.AbstractJobExecutor.executeJobRunner(AbstractJobExecutor.java:122)         at com.watch4net.apg.concurrent.executor.AbstractJobExecutor.access$500(AbstractJobExecutor.java:22)         at com.watch4net.apg.concurrent.executor.AbstractJobExecutor$JobRunnerImpl.run(AbstractJobExecutor.java:274)         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)         at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'         at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1429)         at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1371)         at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)         at com.watch4net.apg.v2.collector.plugins.sqlcollector.polling.MainCollectorJob.executeNextQuery(MainCollectorJob.java:210)         at com.watch4net.apg.v2.collector.plugins.sqlcollector.polling.MainCollectorJob.step(MainCollectorJob.java:182)         ... 6 more Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver         at java.net.URLClassLoader.findClass(URLClassLoader.java:381)         at java.lang.ClassLoader.loadClass(ClassLoader.java:424)         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)         at org.apache.commons.dbcp.BasicDataSource.createConnectionFactory(BasicDataSource.java:1420)

Am I putting the jdbc driver in the right place?  Is there a service I need to restart after dropping it in the directory?

  • Flo_csI

    2 Intern

    167 Posts

    2249

    1

    Posted February 9th, 2016 06:00

    Hi Tom,

    You have to put the JDBC driver under : /opt/APG/Databases/JDBC-Drivers/Default/lib/ then restart you collector.

    HTH

  • 2249

    0

    Posted February 9th, 2016 06:00

    That got it! Thanks!  I didn't see that in any of the documentation, so this was really helpful.

  • Flo_csI

    2 Intern

    167 Posts

    2249

    0

    Posted April 7th, 2016 00:00

    Have you tried restarting the script-engine ?

    /opt/APG/bin/apg-script-engine-default