Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting error like " Listener refused the connection with the following error: ORA-12514, ..."

 
Rupa Katkar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using oracle 10 g,
When i am executing the Login.jsp page, it is giving me error like this......

error while connecting to Oraclejava.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
The Connection descriptor used by the client was:
//localhost:1521/Scott

My tnsnames.ora file contains..

Scott =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.112.4.99)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = test)
)
)

this entry.

And my connection snippet is like this


Please solve my problem
Regards,
Rupa.
 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rupa,

I think this hyperlink will be quite useful to you in resolving this error.

http://www.dbmotive.com/oracle_error_codes.php?errcode=12514
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
your connection URL looks wrong
#
# ods.setURL("jdbc:oracle:thin:@//localhost:1521/Scott");


but your TNS names indicates your service name is called "test"

so try

jdbc:oracle:this:@//localhost:1521/test

or, because I'm used to the following format of url:
jdbc:oracle:thin:@localhost:1521:test

and your host looks like it should be 10.112.4.99 instead of "localhost" unless your localhost is actually 10.112.4.99
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic