Re: Connection refused
- From: David Harper <devnull@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 18:19:15 GMT
Monica wrote:
Hello,[SNIP]
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();
......
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
.
- Follow-Ups:
- Re: Connection refused
- From: Michael Rauscher
- Re: Connection refused
- References:
- Connection refused
- From: Monica
- Connection refused
- Prev by Date: Re: Connection refused
- Next by Date: Re: Connection refused
- Previous by thread: Re: Connection refused
- Next by thread: Re: Connection refused
- Index(es):
Relevant Pages
|
|