Skip to main content

Beginner needs help. Unable to trace the source of Error

2 replies [Last post]
Joined: 2013-09-29
Points: 0

Hello to all,

Can anyone please help me.
I'm using Oracle 10G and Glassfish Server.

NetBeans-->Services tab-->Databases-->Drivers-->Oracle Thin-->Connect Using-->New Connection Wizard-->Test Connection.

I get the following error whenever I click the "Test Connection" button in the New Connection Wizard :--

***Cannot establish a connection to jdbc:oracle:thin:@localhost:1521:XE using oracle.jdbc.OracleDriver (Listener refused the connection with the following error: ORA-12505, TNS:listener does not currently know of SID given in connect descriptor )***

Is this due to the port 8080 conflict between Glassfish and Oracle 10G?
I tried Google.I'm a new bee.Google wasn't of much help.
Error 12505 seems to be a large subset of errors.
Unable to figure the exact error in my case.

Awaiting for your kind suggestions.
Thanks in advance.

new-conection1a.jpg82.31 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2010-06-11
Points: 0

Are you using the correct URL format?


This error should not be anything to do with a clash in ports, at least on 8080, as the JDBC Driver will be attempting to connect on the 1521 port you specified.

Joined: 2013-09-29
Points: 0

Thanks for your kind response.

I think its URL Format is correct: "jdbc:oracle:thin:@localhost:1521:XE" .This is what the wizard shows as the JDBC URL.Please correct me if I'm wrong.
But I'm little confused with the default SID value i.e. XE.
When I login to the sqlplus and execute the command "show parameter instance_name" the value it returns is "orcl".

I tried doing the following,and either way the connection succeeded(I had to unlock both the scott and system account before doing it):

1).Changed SID to orcl --> username: scott --> password:***** --> Clicked "Test Connection".

!Connection Succeeded.

2).Changed SID to orcl --> username: system --> password:***** --> Clicked "Test Connection".

!Connection Succeeded.

After I clicked "Next" it showed SYSTEM as the selected schema(Though it showed a drop down list of several schemas,I didn't change it).
Clicked Next--> It said"Override the default name for the connection..... Input Connection name: jdbc:oracle:thin:@localhost:1521:orcl [system on Default schema] "

Same way,for scott it showed : "Input Connection name: jdbc:oracle:thin:@localhost:1521:orcl [scott on Default schema]"

Which schema should I select from the drop down menu ?? Will overriding the default schema cause any problem?