Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

oracle.jdbc.pool.OracleDataSource not found

698786Aug 18 2009 — edited Aug 18 2009
In JDeveloper 11g, i tried to run the following java code, I got the error:

Error(5,8): class oracle.jdbc.pool.OracleDataSource not found

I guess it is related to some classpath not set, but unable to figure it out, any helps apprecated.

- Denis

----
package myproj;

import java.sql.*;
import oracle.jdbc.*;
import oracle.jdbc.pool.OracleDataSource;

class JDBCVersion {
public static void main (String args[]) throws SQLException
{
OracleDataSource ods = new OracleDataSource();
ods.setURL("jdbc:oracle:thin:hr/hr@113.130.218.168:1521/mydb");
Connection conn = ods.getConnection();

// Create Oracle DatabaseMetaData object
DatabaseMetaData meta = conn.getMetaData();

// gets driver info:
System.out.println("JDBC driver version is " + meta.getDriverVersion());
}

}
------
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 15 2009
Added on Aug 18 2009
1 comment
3,492 views