This is an issue in at least 4.5.2. I say critical because it essentially renders the entire HQ webapp unusable; not sure if it affects data/metric collections.
Problems start to arise when one opts to install Hyperic HQ against an existing Oracle DB. First, there is the problem of setup instructions at this link being inaccurate: http://support.hyperic.com/display/EVO/Set+Up+Oracle#SetUpOracle-ObtainOracleJDBCDriver%28HypericHQonly%29
Step 6 should read: Copy the driver jar file to hyperic-hq-installer-4.x.y/installer/lib
Second, and more importantly, is the fact that the installer fails to do anything about the JDBC driver jar not getting copied to hq-engine/hq-server/webapps/ROOT/WEB-INF/lib. Clearly, without this step the site will not work at all, as evidenced by this stack trace on server startup:
2011-08-15 19:41:38,738 WARN [main] [org.hibernate.cfg.SettingsFactory@117] Could not obtain connection metadata
java.sql.SQLException: oracle.jdbc.driver.OracleDriver
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:208)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:157)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:617)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:561)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:427)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:132)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:94)
.............
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:202)
... 136 more
It appears that the installer does make an attempt to copy the supplied ojdbc*.jar to the resultant lib/ directory of the server but that is insufficient for Tomcat to load the driver!
The workaround is to either copy the driver to hq-engine/hq-server/webapps/ROOT/WEB-INF/lib or hard-link it there (NOTE: By default, Tomcat does not support symlinks - at least not the way it's bundled with HQ).
I am not sure whether the Oracle JDBC driver could not be bundled with with the installer for licensing reasons, but the problem does not seem to affect MySQL installs since the connector jar is in the WEB-INF/lib already.
I am contemplating patching the tarball (server-4.5.2.tar.gz) locally to include the driver jar and repackaging it with the install here internally, since we have to do this anyway to automate installation with new HQU and other plugins. Is there a legal reason to not do this, keeping in mind the package will not redistributed?
Problems start to arise when one opts to install Hyperic HQ against an existing Oracle DB. First, there is the problem of setup instructions at this link being inaccurate: http://support.hyperic.com/display/EVO/Set+Up+Oracle#SetUpOracle-ObtainOracleJDBCDriver%28HypericHQonly%29
Step 6 should read: Copy the driver jar file to hyperic-hq-installer-4.x.y/installer/lib
Second, and more importantly, is the fact that the installer fails to do anything about the JDBC driver jar not getting copied to hq-engine/hq-server/webapps/ROOT/WEB-INF/lib. Clearly, without this step the site will not work at all, as evidenced by this stack trace on server startup:
2011-08-15 19:41:38,738 WARN [main] [org.hibernate.cfg.SettingsFactory@117] Could not obtain connection metadata
java.sql.SQLException: oracle.jdbc.driver.OracleDriver
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:208)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:157)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:617)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:561)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:427)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:132)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:94)
.............
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:202)
... 136 more
It appears that the installer does make an attempt to copy the supplied ojdbc*.jar to the resultant lib/ directory of the server but that is insufficient for Tomcat to load the driver!
The workaround is to either copy the driver to hq-engine/hq-server/webapps/ROOT/WEB-INF/lib or hard-link it there (NOTE: By default, Tomcat does not support symlinks - at least not the way it's bundled with HQ).
I am not sure whether the Oracle JDBC driver could not be bundled with with the installer for licensing reasons, but the problem does not seem to affect MySQL installs since the connector jar is in the WEB-INF/lib already.
I am contemplating patching the tarball (server-4.5.2.tar.gz) locally to include the driver jar and repackaging it with the install here internally, since we have to do this anyway to automate installation with new HQU and other plugins. Is there a legal reason to not do this, keeping in mind the package will not redistributed?