We are using WebSphere Application Server 3.5 as our J2EE application
server. We are attempting to configure a Data Source to an Oracle
8.0.5 database. We have tried various configuration parameters with
little success. Could someone perhaps suggest what we could possibly
be doing wrong ?
Using the App Server's Admin Console, we have configured the
following:
The Oracle database driver: Name: OracleJDBCDriver
Class Name:
oracle.jdbc.driver.OracleDriver
URL Prefix:
jdbc:oracle:thin@server:1521:WHTE
Our datasource (onTimeDataSource): Database name: safwhte
Driver: OracleJDBCDriver
Default_Server's Command Line Arguments: -mx128m -classpath
D:\libs\classes12.zip (which is the Oracle driver zip file)
Our Data Source look up and getting a Connection code:
private void initDataSource()
throws CargoBeanException
{
Context context = null;
Hashtable env = new Hashtable();
env.put
(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContex
tFactory");
try {
//Create the initial naming context
context = new InitialContext(env);
//Look up the DataSource
dataSource = (DataSource) context.lookup
("jdbc/onTimeDataSource");
} catch (Throwable t) {
//DataSource wont be initialized
throw new CargoBeanException("Generic Cargo
Bean: "+t.getMessage());
} finally {
try {
if (context != null) {
context.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
................
//Get a Pooled Connection
con = dataSource.getConnection("username", "password");
We were get the following error:
Connection refused(DESCRIPTION=(TMP=)(VSNNUM=134238208)(ERR=12505)
(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
But now I am getting za.co.scs.ontime.beans.CargoBeanException: Rate
Unit Cargo Bean: Error loading JDBC driver:
oracle.jdbc.driver.OracleDriver which would seem like the application
doesn't know about the Oracle driver despite specifying the location
in the App Server' Admin Console.
I assume we must also import the Oracle driver directly into our
application as well ?