5 Replies Latest reply on Jul 23, 2014 10:34 AM by Thomas Segismont

    Getting rhq-oracle-plugin-4.11.0 to work

    Richard Walker Newbie



      I'm new to RHQ and have been experimenting with its value on the enterprise I manage. One of the key abilities is to include the monitoring of Oracle database.


      I've done quite a bit of hunting on the web and tried a range of things with no luck. Details seem to be worryingly thin to say the least.


      I am trying to import an Oracle Server from the Inventory in RHQ. The agent throws a Java Exception which essentially translates to "Specified JDBC driver class (oracle.jdbc.driver.OracleDriver) not found.".


      Fair enough?


      So, to be sure I've extracted the rhq-oracle-plugin-4.11.0.jar and in META-INF/maven/org.rhq/rhq-oracle-plugin/pom.xml its expecting  <artifactId>ojdbc6</artifactId>.


      I've downloaded this from Oracle for our version of Oracle (,


      I'm happy that it is the RHQ agent that need this.


      I've tried placing it under ../rhq-agent/plugins & ../rhq-agent/lib


      I've extracted rhq-oracle-plugin-4.11.0.jar added included lib/ojdbc6.jar and recreated the jar.


      Nothing is working for me and I have no more clues or ideas...this is all on RHEL6 BTW.


      Can anyone help?




        • 1. Re: Getting rhq-oracle-plugin-4.11.0 to work
          Elias Ross Master

          Can you send out the file listing for the rhq-oracle plugin? Also check that the agent has the correct version of the plugin:


          $ unzip -l target/rhq-oracle-plugin-5.0.4-SNAPSHOT.jar

          Archive:  target/rhq-oracle-plugin-5.0.4-SNAPSHOT.jar

            Length     Date   Time    Name

          --------    ----   ----    ----


            2152051  07-15-14 12:41   lib/ojdbc6-

          I have my own version of the plugin, but this is the general idea.

          • 2. Re: Getting rhq-oracle-plugin-4.11.0 to work
            Richard Walker Newbie

            Archive:  rhq-oracle-plugin-4.11.0.jar

              Length      Date    Time    Name

            ---------  ---------- -----   ----

                    0  07-16-2014 09:23   META-INF/

                   62  07-16-2014 09:23   META-INF/MANIFEST.MF

                    0  07-16-2014 09:23   lib/

              2152051  07-15-2014 12:52   lib/ojdbc6.jar

                38331  05-05-2014 23:00   META-INF/rhq-plugin.xml

                    0  05-05-2014 23:00   META-INF/maven/

                    0  05-05-2014 23:00   META-INF/maven/org.rhq/

                    0  05-05-2014 23:00   META-INF/maven/org.rhq/rhq-oracle-plugin/

                  110  05-05-2014 23:00   META-INF/maven/org.rhq/rhq-oracle-plugin/pom.properties

                 7364  05-05-2014 22:26   META-INF/maven/org.rhq/rhq-oracle-plugin/pom.xml

                    0  05-05-2014 23:00   org/

                    0  05-05-2014 23:00   org/rhq/

                    0  05-05-2014 23:00   org/rhq/plugins/

                    0  05-05-2014 23:00   org/rhq/plugins/oracle/

                 4791  05-05-2014 23:00   org/rhq/plugins/oracle/OracleFlashRecoveryAreaComponent.class

                 4725  05-05-2014 23:00   org/rhq/plugins/oracle/OracleTablespaceComponent.class

                 7743  05-05-2014 23:00   org/rhq/plugins/oracle/OracleServerComponent.class

                 6002  05-05-2014 23:00   org/rhq/plugins/oracle/OracleAsmDiskGroupComponent.class

                 6177  05-05-2014 23:00   org/rhq/plugins/oracle/OracleDiscoveryComponent.class

                 4646  05-05-2014 23:00   org/rhq/plugins/oracle/OracleUserComponent.class

                 5023  05-05-2014 23:00   org/rhq/plugins/oracle/OracleAsmDiskGroupDiscoveryComponent.class

                 2205  05-05-2014 23:00   org/rhq/plugins/oracle/OraclePooledConnectionProvider.class

                 2327  05-05-2014 23:00   org/rhq/plugins/oracle/OraclePluginLifecycleListener.class

            ---------                     -------

              2241557                     23 files


            What I don't understand is that if the ojdbc driver is essential for this plugin to work why is it clear as mud on how to include it and get the plugin working?


            I found another clue on the web on the rhq-server that it does include:



            Should this one be used? Why do some people say that due to Oracle licencing the driver can't be included yet this is bundled with the RHQ server?

            • 3. Re: Getting rhq-oracle-plugin-4.11.0 to work
              Richard Walker Newbie

              Hi again,


              So - maybe I was not seeing the wood for the trees and missed a rookie trick, I had to restart the RHQ agent for my updated plugin to work. Here are my steps in case anyone else has this pain:


              I wanted to add a Monitor of an Oracle database using RHQ agent on RHEL6.

              Downloaded "Oracle Database 11g Release 2 ( JDBC Drivers" - ojdbc6.jar


              Copied the Oracle Plugin to some place to work on and upload ojdbc6.jar to /tmp :


              # mkdir /tmp/oracle-plugin

              # cp /opt/rhq-agent/plugins/rhq-oracle-plugin-4.11.0.jar /tmp/oracle-plugin

              # cd /tmp/oracle-plugin

              # unzip rhq-oracle-plugin-4.11.0.jar

              # mkdir lib

              # mv /tmp/ojdbc6.jar /tmp/oracle-plugin/lib

              # jar cf rhq-oracle-plugin-4.11.0.jar lib META-INF org

              # cp rhq-oracle-plugin-4.11.0.jar  /opt/rhq-agent/plugins/

              # cd /opt/rhq-agent/bin

              # ./rhq-agent-wrapper.sh restart


              I was then able to do a Inventory/Import/Oracle Server successfully in the main RHQ Management GUI.





              • 4. Re: Getting rhq-oracle-plugin-4.11.0 to work
                Elias Ross Master

                Sorry about the plugin being hard to deal with.


                If you download the RHQ source code and set the right magic, Maven build you the plugin correctly.

                Why do some people say that due to Oracle licencing the driver can't be included yet this is bundled with the RHQ server?

                Actually RHQ doesn't include the Oracle driver. I believe that jar is a dummy. You have to copy it to your server before it can start.

                • 5. Re: Getting rhq-oracle-plugin-4.11.0 to work
                  Thomas Segismont Expert

                  Hi Richard,


                  The Oracle driver for RHQ server issue is actually documented in the wiki:

                  1. Installing the Server - RHQ - Project Documentation Editor
                  2. Oracle - RHQ - Project Documentation Editor


                  It's true though that the Oracle agent plugin setup is missing an How-to page. We'd be glad to accept that as a contribution.


                  Feel free to ask any question on the forum as you continue experimenting with RHQ.