This post is more than 5 years old
8 Posts
0
3031
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
2 Intern
•
166 Posts
1
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
TomRogneby
8 Posts
0
February 9th, 2016 06:00
That got it! Thanks! I didn't see that in any of the documentation, so this was really helpful.
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
0
April 6th, 2016 09:00
Hi Tom
I followed your recommendations but always get these error message when i test the connection against the Oracle 11g Database
line 22: sql: command returned with a non-zero status (status: 1) !
Cannot locate driver 'oracle.jdbc.driver.OracleDriver'
I've had a look in Oracle jdbc driver Page and installed ojdbc6.jar and copied the jar file in the folder u recommended on the collector and also on the Frontend Server to make sure that not the Frontend Server is the guilty guy.
Do u have an idea ??
The user we connected to the database is the sys user so he have all root accesses.
Flo_csI
2 Intern
2 Intern
•
166 Posts
0
April 7th, 2016 00:00
Have you tried restarting the script-engine ?
Anonymous
5 Practitioner
5 Practitioner
•
274.2K Posts
0
April 7th, 2016 03:00
I have to set the chown for apg and had to made it executable After that all works Fine
Thx for the help
Aus Outlook Mobile gesendet