• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 405
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 820
IntelliJ IDE VI Editor Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
I am a man of mystery. Mostly because of this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic