File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes connection refused Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "connection refused" Watch "connection refused" New topic
Author

connection refused

suresh pulapally
Ranch Hand

Joined: Mar 15, 2005
Posts: 47
SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=1 2505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

This is the error message when I connect to DB using Java program.
SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=1 2505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))


here is segment of my Java code:

DriverManager.registerDriver( new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection"jdbcracle:thin:@xxx.xx.xx.xxx:
1521:sid", "username", "password");

Anyone can help me to fix it? Any more information needed, please email me. I will reply you within one day.
Thanks a lot!
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

ORA-12505


Cause: The SID in the CONNECT_DATA was not found in the listener's tables.

Action: Check to make sure that the SID specified is correct.
The SIDs that are currently registered with the listener can be obtained by typing supported can
be obtained by typing "LSNRCTL SERVICES listener_name".
These SIDs correspond to SID_NAMEs in TNSNAMES.ORA or db_names in INIT.ORA. Comment:
This error will be returned if the database instance has not registered with the listener;
the instance may need to be started.



Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
suresh pulapally
Ranch Hand

Joined: Mar 15, 2005
Posts: 47
thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: connection refused