Categories

JAVA DATEBASE
Technology Network Community
Oracle Database
Fusion Middleware
Development Tools
Java
Desktop
Server & Storage Systems
Enterprise Management
Berkeley DB Family
Cloud Computing
Big Data
Business Intelligence
Architecture
Migration and Modernization
E-Business Suite
Siebel
PeopleSoft Enterprise
JD Edwards World
Industries
JD Edwards EnterpriseOne
User Productivity Kit Pro (UPK) and Tutor
Governance, Risk & Compliance (GRC)
Master Data Management (MDM)
Oracle CRM On Demand
On Demand: SaaS and Managed Applications
AutoVue Enterprise Visualization
Primavera
ATG
Agile PLM
Endeca Experience Management
Fusion Applications
Archived Forums

 



Tags

General Questions


JDBC - ORA-12514 TNS:listener does not currently know of service requested


Hi, I am using JDBC driver in Java for connecting to my Oracle XE 11g database on Windows 2008 Server R2 Standard, but I am receiving the following error  +java.sql.SQLException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor+  I am using this connection string:  jdbc:oracle:thin:@WIN-H0E7IBS7HLQ:1521:XE;  The configuration files:  listener.ora:  SID_LIST_LISTENER =   (SID_LIST =     (SID_DESC =       (SID_NAME = PLSExtProc)       (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)       (PROGRAM = extproc)     )     (SID_DESC =       (SID_NAME = CLRExtProc)       (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)       (PROGRAM = extproc)     )   )  LISTENER =   (DESCRIPTION_LIST =     (DESCRIPTION =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))       (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-H0E7IBS7HLQ)(PORT = 1521))     )   )  DEFAULT_SERVICE_LISTENER = (XE)  tsnames.ora:  XE =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = WIN-H0E7IBS7HLQ)(PORT = 1521))     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = XE)     )   )  EXTPROC_CONNECTION_DATA =   (DESCRIPTION =     (ADDRESS_LIST =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))     )     (CONNECT_DATA =       (SID = PLSExtProc)       (PRESENTATION = RO)     )   )  ORACLR_CONNECTION_DATA =    (DESCRIPTION =      (ADDRESS_LIST =        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))      )      (CONNECT_DATA =        (SID = CLRExtProc)        (PRESENTATION = RO)      )    )   sqlnet.ora:  SQLNET.AUTHENTICATION_SERVICES = (NTS)  I have already run some diagnostic tools:  tnsping XE  TNS Ping Utility for 32-bit Windows: Version 11.2.0.2.0 - Production on 18 013 17:38:48  Copyright (c) 1997, 2010, Oracle.  All rights reserved.  Used parameter files: C:\oraclexe\app\oracle\product\11.2.0\server\network\admin\sqlnet.ora  Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = WI IBS7HLQ)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME ) OK (30 msec)  lsnrctl status  LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 18-MAR-2013 :10  Copyright (c) 1991, 2010, Oracle.  All rights reserved.  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) STATUS of the LISTENER  Alias                     LISTENER Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.2.0 - ction Start Date                18-MAR-2013 17:25:02 Uptime                    0 days 0 hr. 16 min. 7 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Default Service           XE Listener Parameter File   C:\oraclexe\app\oracle\product\11.2.0\server\net dmin\listener.ora Listener Log File         C:\oraclexe\app\oracle\diag\tnslsnr\WIN-H0E7IBS7 stener\alert\log.xml Listening Endpoints Summary...   (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EXTPROC1ipc)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-H0E7IBS7HLQ)(PORT=1521)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-H0E7IBS7HLQ)(PORT=8080))(P ation=HTTP)(Session=RAW)) Services Summary... Service "CLRExtProc" has 1 instance(s).   Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service Service "PLSExtProc" has 1 instance(s).   Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service Service "XEXDB" has 1 instance(s).   Instance "xe", status READY, has 1 handler(s) for this service... Service "xe" has 1 instance(s).   Instance "xe", status READY, has 1 handler(s) for this service... The command completed successfully  lsnrctl services  LSNRCTL for 32-bit Windows: Version 11.2.0.2.0 - Production on 18-MAR-2013 :06  Copyright (c) 1991, 2010, Oracle.  All rights reserved.  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1))) Services Summary... Service "CLRExtProc" has 1 instance(s).   Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service     Handler(s):       "DEDICATED" established:0 refused:0          LOCAL SERVER Service "PLSExtProc" has 1 instance(s).   Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service     Handler(s):       "DEDICATED" established:0 refused:0          LOCAL SERVER Service "XEXDB" has 1 instance(s).   Instance "xe", status READY, has 1 handler(s) for this service...     Handler(s):       "D000" established:0 refused:0 current:0 max:1022 state:ready          DISPATCHER <machine: WIN-H0E7IBS7HLQ, pid: 5248>          (ADDRESS=(PROTOCOL=tcp)(HOST=WIN-H0E7IBS7HLQ)(PORT=57253)) Service "xe" has 1 instance(s).   Instance "xe", status READY, has 1 handler(s) for this service...     Handler(s):       "DEDICATED" established:0 refused:0 state:ready          LOCAL SERVER The command completed successfully  I have searched a lot about what is possible is going on, but I have'nt found nothing yet. Can somebody please help me  Edited by: 994624 on 18-mar-2013 15:54

994624 wrote: Hi, I am using JDBC driver in Java for connecting to my Oracle XE 11g database on Windows 2008 Server R2 Standard, but I am receiving the following error  +java.sql.SQLException: Listener refused the connection with the following error: ORA-12514, TNS:listener does not currently know of service requested in connect descriptor+   ORA-12514 ALWAYS only occurs due to a problem on DB Server system. One cause of this problem is when the Oracle database is down &#38; needs to be started. A remote client send a request to the Listener asking to be connected to a specific service. If/when the listener does not know anything about that service, the listener responds with ORA-12514  post results from the following two OS commands: lsnrctl status lsnrctl service  Since every connection request to the listener gets logged, listener.log file will contain a line with 12514 as status code.  This line contains valuable debugging details. So post this line &#38; surrounding lines.  for additional debugging suggestions read the URL below: http://edstevensdba.wordpress.com/2011/03/19/ora-12514/

I have already posted lsnrctl status, lsnrctl service results. Both server and client are in the same server.  Here it is the listener.log  Mon Mar 18 17:57:13 2013 18-MAR-2013 17:57:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49297)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 17:57:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49299)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 17:57:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49301)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 17:57:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49302)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 17:57:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49303)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 17:57:13 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49304)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 17:57:20 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=49390)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=WIN-H0E7IBS7HLQ)(PORT=1521)))  NOTE that listener.log shows the listener is listening on IP# 127.0.0.1 This means that no remote client can ever connect to this server.  what results when you issue OS command below?  ping WIN-H0E7IBS7HLQ  post content of "hosts" file

Why do all of those entries have this  )(HOST=127.0.0.1  If you said you were using this hostname?  jdbc:oracle:thin:@WIN-H0E7IBS7HLQ:1521:XE; 

Both client and server are in localhost. I had a DNS to change the hostname to 127.0.0.1. I have remove it. Same thing happens. This is the listener.log  Mon Mar 18 18:15:18 2013 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.84)(PORT=63780)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::b8b1:84a9:681b:ab5a%11)(PORT=63781)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::18ef:3bdd:3f57:feab%15)(PORT=63782)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2001:0:9d38:953c:18ef:3bdd:3f57:feab)(PORT=63783)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.84)(PORT=63785)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::b8b1:84a9:681b:ab5a%11)(PORT=63786)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::18ef:3bdd:3f57:feab%15)(PORT=63787)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2001:0:9d38:953c:18ef:3bdd:3f57:feab)(PORT=63788)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.84)(PORT=63789)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::b8b1:84a9:681b:ab5a%11)(PORT=63790)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::18ef:3bdd:3f57:feab%15)(PORT=63791)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2001:0:9d38:953c:18ef:3bdd:3f57:feab)(PORT=63792)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.84)(PORT=63793)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::b8b1:84a9:681b:ab5a%11)(PORT=63794)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::18ef:3bdd:3f57:feab%15)(PORT=63795)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2001:0:9d38:953c:18ef:3bdd:3f57:feab)(PORT=63796)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.84)(PORT=63797)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::b8b1:84a9:681b:ab5a%11)(PORT=63798)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::18ef:3bdd:3f57:feab%15)(PORT=63799)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2001:0:9d38:953c:18ef:3bdd:3f57:feab)(PORT=63800)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.84)(PORT=63802)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::b8b1:84a9:681b:ab5a%11)(PORT=63803)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::18ef:3bdd:3f57:feab%15)(PORT=63804)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:18 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2001:0:9d38:953c:18ef:3bdd:3f57:feab)(PORT=63805)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:24 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.84)(PORT=63885)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:24 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::b8b1:84a9:681b:ab5a%11)(PORT=63886)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:24 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=fe80::18ef:3bdd:3f57:feab%15)(PORT=63887)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:15:24 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=xe;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=2001:0:9d38:953c:18ef:3bdd:3f57:feab)(PORT=63888)) * establish * xe; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor

Do YOU see any of this hostname in there anywhere? I don't. jdbc:oracle:thin:@WIN-H0E7IBS7HLQ:1521:XE;  If your name is John and someone calls out 'Mike' are you going to answer?

994624 wrote: Both client and server are in localhost.   Above ONLY works when they are  the same physical system  hostname must be assigned a routable IP# other than 127.0.0.1

The IP of the hostname is 192.168.1.84 and the mac is fe80::b8b1:84a9:681b:ab5a%11. The server is in the localhost, so it is the same. If your name is Jhon and your nickname is Mike, you will respond with either the two names.

They are in the same physical system

994624 wrote: The IP of the hostname is 192.168.1.84 and the mac is fe80::b8b1:84a9:681b:ab5a%11. The server is in the localhost, so it is the same. If your name is Jhon and your nickname is Mike, you will respond with either the two names.  Obviously Oracle disagrees with you.  It might succeed, if you place 127.0.0.1 inside tnsnames.ora file  XE = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST =  127.0.0.1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE) ) )

Ok, following your advices, I change connection string to this jdbc:oracle:thin:@//127.0.0.1:1521/XE; and change the files like this:  transname.ora:   XE =   (DESCRIPTION =     (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))     (CONNECT_DATA =       (SERVER = DEDICATED)       (SERVICE_NAME = XE)     )   )  EXTPROC_CONNECTION_DATA =   (DESCRIPTION =     (ADDRESS_LIST =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))     )     (CONNECT_DATA =       (SID = PLSExtProc)       (PRESENTATION = RO)     )   )  ORACLR_CONNECTION_DATA =    (DESCRIPTION =      (ADDRESS_LIST =        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))      )      (CONNECT_DATA =        (SID = CLRExtProc)        (PRESENTATION = RO)      )    )   listener.ora:  SID_LIST_LISTENER =   (SID_LIST =     (SID_DESC =       (SID_NAME = PLSExtProc)       (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)       (PROGRAM = extproc)     )     (SID_DESC =       (SID_NAME = CLRExtProc)       (ORACLE_HOME = C:\oraclexe\app\oracle\product\11.2.0\server)       (PROGRAM = extproc)     )   )  LISTENER =   (DESCRIPTION_LIST =     (DESCRIPTION =       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))       (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))     )   )  DEFAULT_SERVICE_LISTENER = (XE)  I getting same error and the following listener.log  TIMESTAMP * CONNECT DATA [* PROTOCOL INFO] * EVENT [* SID] * RETURN CODE Mon Mar 18 18:49:09 2013 18-MAR-2013 18:49:09 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=XE;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57609)) * establish * XE; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:49:09 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=XE;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57610)) * establish * XE; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:49:09 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=XE;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57611)) * establish * XE; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:49:09 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=XE;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57612)) * establish * XE; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:49:09 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=XE;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57613)) * establish * XE; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:49:09 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=XE;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57614)) * establish * XE; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor 18-MAR-2013 18:49:15 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))(SERVICE_NAME=XE;)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=Administrador))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=57698)) * establish * XE; * 12514 TNS-12514: TNS:listener does not currently know of service requested in connect descriptor

 If your name is Jhon and your nickname is Mike, you will respond with either the two names.   And if someone doesn't respond you should assume that they do NOT know what their nickname is; likely because you haven't told them.  Good luck with your problem; you don't seem to want to hear the answer.

994624 wrote: Ok, following your advices, I change connection string to this jdbc:oracle:thin:@//127.0.0.1:1521/XE; and change the files like this:  JDBC thin does NOT require or utilize tnsnames.ora  below worked for me [oracle@localhost ~]$ cat Conn.java  import java.sql.*; class Conn {   public static void main (String[] args) throws Exception   {    Class.forName ("oracle.jdbc.OracleDriver");      Connection conn = DriverManager.getConnection      ("jdbc:oracle:thin:@//localhost:1521/orcl", "user1", "user1");                         // @//machineName:port/SID,   userid,  password    try {      Statement stmt = conn.createStatement();      try {        ResultSet rset = stmt.executeQuery("select BANNER from SYS.V_$VERSION");        try {          while (rset.next())            System.out.println (rset.getString(1));   // Print col 1        }         finally {           try { rset.close(); } catch (Exception ignore) {}        }      }       finally {        try { stmt.close(); } catch (Exception ignore) {}      }    }     finally {      try { conn.close(); } catch (Exception ignore) {}    }   } } [oracle@localhost ~]$ javac Conn.java [oracle@localhost ~]$ export CLASSPATH=/home/oracle/app/oracle/product/11.2.0/dbhome_2/jdbc/lib/ojdbc6.jar:. [oracle@localhost ~]$ java Conn Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production PL/SQL Release 11.2.0.2.0 - Production CORE    11.2.0.2.0      Production TNS for Linux: Version 11.2.0.2.0 - Production NLSRTL Version 11.2.0.2.0 - Production [oracle@localhost ~]$ lsnrctl status   LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 18-MAR-2013 17:32:22   Copyright (c) 1991, 2010, Oracle.  All rights reserved.   Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias                     LISTENER Version                   TNSLSNR for Linux: Version 11.2.0.2.0 - Production Start Date                18-MAR-2013 17:15:17 Uptime                    0 days 0 hr. 17 min. 4 sec Trace Level               off Security                  ON: Local OS Authentication SNMP                      OFF Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml Listening Endpoints Summary...   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW)))   (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW))) Services Summary... Service "orcl" has 1 instance(s).   Instance "orcl", status READY, has 2 handler(s) for this service... Service "orclXDB" has 1 instance(s).   Instance "orcl", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@localhost ~]$ lsnrctl service   LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 18-MAR-2013 17:32:28   Copyright (c) 1991, 2010, Oracle.  All rights reserved.   Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=1521))) Services Summary... Service "orcl" has 1 instance(s).   Instance "orcl", status READY, has 2 handler(s) for this service...     Handler(s):       "DEDICATED" established:2 refused:0 state:ready          LOCAL SERVER       "N000" established:0 refused:0 current:0 max:20000 state:ready          CMON <machine: localhost.localdomain, pid: 3814>          (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=27604)) Service "orclXDB" has 1 instance(s).   Instance "orcl", status READY, has 1 handler(s) for this service...     Handler(s):       "D000" established:0 refused:0 current:0 max:1022 state:ready          DISPATCHER <machine: localhost.localdomain, pid: 3773>          (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=46602)) The command completed successfully [oracle@localhost ~]$  

I was just following your analogy. I don't understand how that could mean not to want to hear the answer. It is just not clear for me how can oracle can be confuse about names that means the same, that's all.


Related Links

Different lsnrctl status on RAC Nodes
Order by in MATERIALIZED VIEW not work successfully with first column (ID)
Job is scheduled but not picked for running and failure count increases
Not able to connect / as sysdba
tablespace in read only
Secure LOB compression between server and client
Queries on Oracle Internet Directory Server
ELAPSED_TIME
Too many blocks updated in IOT
DBlinks, how to Manage
3rd party solution: Bonita Open Solution and Oracle SQL
Can't connect to remote DB
ORA-01219: database not open: queries allowed on fixed tables/views only
Query predicate evaluation
failure group
materialize hint avoids parse error in query with view and group by