Bug 109380 - ccm status mistakenly checks for Oracle JAR even when JDBC url is set for PostgreSQL
Summary: ccm status mistakenly checks for Oracle JAR even when JDBC url is set for Po...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Web Application Framework
Classification: Retired
Component: other
Version: nightly
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Archit Shah
QA Contact: Jon Orris
URL:
Whiteboard:
Depends On:
Blocks: 106481
TreeView+ depends on / blocked
 
Reported: 2003-11-07 11:26 UTC by Daniel Berrangé
Modified: 2007-04-18 16:59 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-01-26 21:07:33 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2003-11-07 11:26:41 UTC
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 14:55:21 UTC
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 Berrangé 2003-11-07 14:58:29 UTC
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 15:44:46 UTC
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 16:44:29 UTC
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 22:03:30 UTC
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 21:07:19 UTC
Fixed @39180


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