aspose file tools*
The moose likes JDBC and the fly likes Getting error like Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Getting error like " Listener refused the connection with the following error: ORA-12514,  ..."" Watch "Getting error like " Listener refused the connection with the following error: ORA-12514,  ..."" New topic
Author

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

Rupa Katkar
Ranch Hand

Joined: Aug 12, 2009
Posts: 35
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

Joined: Mar 28, 2007
Posts: 403
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

Cheers!!!
Ujjwal B Soni <baroda, gujarat, india> <+919909981973>
"Helping hands are better than praying lips......"
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

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
 
Don't get me started about those stupid light bulbs.
 
subject: Getting error like " Listener refused the connection with the following error: ORA-12514, ..."