Re: Connection refused



Monica wrote:
Hello,

I hope someone can help. Please let me know if this is the wrong group
for my question.

I am new to java, jsp and oracle, so I ask that you please be patient.
I am attempting to create a context-param in web.xml for my connection
string, so that when I need to change the string I will only need to do
it in one place instead of 10+ files. When I perform a pooled
connection from within my code, the connection works correctly. For
example:

.....
PooledConnection conn = null;
Connection conn2 = null;
try
{
OracleConnectionPoolDataSource ocpds= new
OracleConnectionPoolDataSource();
ocpds.setURL("jdbc:oracle:thin:@<myservername>:1526:ORCL");
ocpds.setUser("user");
ocpds.setPassword("pass");

conn = ocpds.getPooledConnection();
conn2 = conn.getConnection();
......
[SNIP]
The error I receive is:

SQLException: Io exception: Connection
refused(DESCRIPTION=(TMP=)(VSNNUM=168821504)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

Caveat: I'm a MySQL user, I'm not an Oracle guru! I simply googled for the Oracle error code 12505 which appears in the message of your SQLException. This error code may offer a clue that you can follow up.

Error 12505 appears to mean: "TNS:listener could not resolve SID given in connect descriptor".

Maybe this will ring a bell with one of the resident Oracle experts around here?

David Harper
Cambridge, England
.



Relevant Pages

  • RE: Trouble connecting to SQL Server 2000 from Mobile Device
    ... value returned was simply "SqlException". ... No numeric error code or anything. ... >> I am having trouble connecting to a SQL Server 2000 server on our network. ... It bombs on the connection. ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: ADO.Net Connection Pooling Problem with Oracle
    ... the CLR is releasing the connection to your database. ... the number of database sessions in Oracle seem to ...
    (microsoft.public.dotnet.framework.adonet)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: SOS! ORA-03114: not connected to ORACLE && MSs Bug??
    ... not connected to ORACLE && MS's Bug?? ... > but sometimes returning the following exception "ORA-03114: ... > when loosing the connection with the Oracle database server the connections ... > even after the connection with the database server has been restore. ...
    (microsoft.public.dotnet.framework.adonet)