Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Connection Refused

  Asked By: Dukker    Date: May 26    Category: Java    Views: 807
  

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 ?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Nicholas Wells     Answered On: May 26

I think you should have the jdbc driver  in your
classpath.

About your URL Prefix:
jdbc:oracle:thin@server:1521:WHTE
Your database  name is "safwhte" but you use "WHTE" as
the name of your database.
jdbc:oracle:thin@server:1521:safwhte

Shouldn't you have a colon after thin?
jdbc:oracle:thin:@

A question: doe's WebSphere 3.5 support oracle  8.05 or
higher?

 
Didn't find what you were looking for? Find more on Connection Refused Or get search suggestion and latest updates.




Tagged: