Bug 109380 - ccm status mistakenly checks for Oracle JAR even when JDBC url is set for PostgreSQL
ccm status mistakenly checks for Oracle JAR even when JDBC url is set for Po...
Status: CLOSED RAWHIDE
Product: Red Hat Web Application Framework
Classification: Retired
Component: other (Show other bugs)
nightly
All Linux
medium Severity medium
: ---
: ---
Assigned To: Archit Shah
Jon Orris
:
Depends On:
Blocks: 106481
  Show dependency treegraph
 
Reported: 2003-11-07 06:26 EST by Daniel Berrange
Modified: 2007-04-18 12:59 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-01-26 16:07:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2003-11-07 06:26:41 EST
Description of problem:
The 'ccm status' tool does a number of checks & reports any problems
found. The Oracle JAR check, however, is performed regardless of
whether Oracle is configured as the database in the JDBC url. This
will confuse administrators who are running on PostgreSQL, because
they'll wonder why they should need an Oracle JAR installed.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Set JDBC url to point to a PostgreSQL database
2. Run ccm status
3.
  
Actual results:
Class not found
WARNING: Oracle JDBC driver not found

The CCM persistence layer requires the Oracle JDBC driver in order to
function.  The Oracle JDBC driver is typically in a file called
"classes12.zip" or "classes12.jar".  Check your classpath.

The classpath of the CCM runtime includes

  * jar files in JAVA_HOME/jre/lib/ext

  * jars, zips, or class files under one of the paths listed in
    CCM_HOME/ccm.classpath if it exists or /etc/ccm/ccm.classpath
    otherwise

  * the CLASSPATH environment variable.


Expected results:
No warning shown.

Additional info:
Comment 1 Vadim Nasardinov 2003-11-07 09:55:21 EST
What's the intended use of the "ccm status" command?

You do want to check for classes12.(zip|jar) if you are setting
up a development environment.  We have a compile-time dependency
on the Oracle JDBC drivers, do we not?
Comment 2 Daniel Berrange 2003-11-07 09:58:29 EST
Its for validating a server configuration before trying to start it.
The ccm tools depends on Core having previously being built since it
is implemented using classes in the c.a.packaging package. This if
classes12 were missing in development, you wouldn't even be able to
compile core & thus you wouldn't even get as far as running 'ccm status'.
Comment 3 Richard Li 2003-11-10 10:44:46 EST
Before we implement the check, we need to audit the code to make sure
there are no run-time dependencies on classes12. Moving to RC0 for now.
Comment 4 Brian Stein 2003-11-10 11:44:29 EST
The fact that this is an extraneous error message (and will be fixed
in RC0) should be included in the known bugs list.
Comment 5 Richard Li 2004-01-06 17:03:30 EST
Per rhs's suggestion, I added the following line to testFairness in
PooledConnectionSourceTest:

   Class.forName("oracle.jdbc.driver.OracleDriver");

I moved my classes12 (oracle-jdbc-xxx.jar) to /tmp/ so it would not
appear in the classpath, and then ran all the persistence tests on
Postgres.

I got:

    [junit] Tests run: 193, Failures: 2, Errors: 4, Time elapsed:
49.542 sec

Failures were testLoopDetection, testOrderLineAssociation. Errors were
testAggressiveClosing, testFairness (as expected),
testStatementClosing, and testStatementClosingTestCase. The latter two
depend on aggressive close.

Testcase: testFairness took 0.015 sec
    Caused an ERROR
oracle.jdbc.driver.OracleDriver
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
Comment 6 Richard Li 2004-01-07 16:07:19 EST
Fixed @39180

Note You need to log in before you can comment on or make changes to this bug.