Mantis - Quercus
Viewing Issue Advanced Details
2400 minor always 02-05-08 04:50 08-07-08 20:26
closed 3.1.4  
none 3.2.0  
0002400: oci_connect - java.lang.ClassCastException: oracle.jdbc.OracleDriver to DataSource
(rep by buckyball)

Since OCI support should be fixed in 3.1.5, I thought
to make a new try, but I still can't get it to work:

/home/sven/jetty-6.1.7/webapps-plus/quercus-3.1.3/index.php:3: Warning: A link to the server could not be established. java.lang.ClassCastException: oracle.jdbc.OracleDriver cannot be cast to javax.sql.DataSource [oci_connect]

I wonder why this happens. My configuration:

-- connection code:

$conn = oci_connect('xxx', 'yyy', 'java:comp/env/jdbc/DSTest');
if (!$conn) {
$e = oci_error();
print htmlentities($e['message']);

--- Datasource env:

<New id="DSTest" class="">
<Arg>jdbc/DSTest </Arg>
<New class="oracle.jdbc.pool.OracleConnectionPoolDataSource">
<Set name="URL">jdbc:oracle:thin:@ </Set>
<Set name="User">xxx</Set>
<Set name="Password">yyy</Set>

As you can see, I don't use 'oracle.jdbc.OracleDriver' but 'oracle.jdbc.pool.OracleConnectionPoolDataSource'.

A *.jsp test page + sql tags worked with the same DataSource like a charm.

Any comments on that ?

There are no notes attached to this issue.