If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > ERR=12505 Connection refused

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2003
Posts: 4
ERR=12505 Connection refused

I have recently installed Oracle 9 and am trying to connect to it using my Java code. I have done this many times before when connecting to Oracle 8 on other boxes.

My java code looks like:

String dbDriver = "oracle.jdbc.driver.OracleDriver";
String dbServer = "jdbc:oracle:thin:@192.168.1.70:1521:oracle.domain .bluespark.com";
String username = "meds";
String password = "meds";
...
con = DriverManager.getConnection(dbServer, username, password);

I tested the above on another sid on another boxe and it worked fine.

Using the SID above I get the following error:
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153092352)(ERR=1 2505)(ERROR_STACK=(ERR
OR=(CODE=12505)(EMFI=4))))

If I use this SID: jdbc:oracle:thin:@192.168.1.70:1521:oracle
I get this error: java.sql.SQLException: ORA-00600: internal error code, arguments: [ttcgcshnd-1], [0], [], [], [], [], [], []


My tnsnames.ora looks like this:
# TNSNAMES.ORA Network Configuration File: E:\Oracle\Ora9\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

INST1_HTTP.DOMAIN.BLUESPARK.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.70)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = MODOSE)
(PRESENTATION = http://HRService)
)
)

EXTPROC_CONNECTION_DATA.DOMAIN.BLUESPARK.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

ORACLE.DOMAIN.BLUESPARK.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.70)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = oracle.neal.bluespark)
)
)

My listener.ora looks like this:
# LISTENER.ORA Network Configuration File: E:\Oracle\Ora9\network\admin\listener.ora
# Generated by Oracle configuration tools.

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.70)(PORT = 1521))
)
)
)

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E:\Oracle\Ora9)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = oracle.neal.bluespark)
(ORACLE_HOME = E:\Oracle\Ora9)
(SID_NAME = oracle)
)
)

I can connect to the meds tablespace no proble using SQLPlus with:
username: meds
password: meds
host: oracle


Any help would be greatly appreciated.
Thanks,
Neal
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
Join Date: Nov 2003
Posts: 4
Re: ERR=12505 Connection refused

I figured it out. I needed the new version of the driver. SID is "oracle" in my case and everythign is now working fine.
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Nov 2004
Posts: 2
it worked

Thanks for the info.

I have a Oracle 10g Database to which I was trying to connect using JDBC code...

String driver = "oracle.jdbc.driver.OracleDriver";
Class.forName(driver);
String url = "jdbcracle:thin:britney/xxxxxxx@mydomain:1521:dbserver10g";
Connection con = DriverManager.getConnection(url);

Encountered the same error:

Caught SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=168821248)(ERR=1 2505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))

I just had to download the new 10g drivers (classes12.jar) from otnotn

It worked!
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Aug 2013
Posts: 1
Correct the port number

Hi,
This erreor is may be due to the database connection.
in my cas, i find out that database url (ex thin:@serverName.fr:21629:InstanceName ) the database port number was wrong

After correcting the port number,all worked fine.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On