wnotn
asked on
ORA-12154: Connecting from JSP to Oracle 8.1.6 ???
Hello,
I hope someone can help me with the following problem:
As I faced some problems connecting from Weblogic Server to Oracle 8i, using connection pool (please
check question of 7th September, still waiting for answer that solves the problem), I have tried to connect directly from a Java Server Page on Webserver to Oracle 8i, without any pool connection.
I got the following error message:
...java.sql.SQLException: Error while trying to retrieve text for error ORA-12154 ...
ORA-12154 has the following contents:
ORA-12154, 00000, "TNS:could not resolve service name"
// *Cause: The service name specified is not defined correctly in the TNSNAMES.ORA file.
// *Action: Make the following checks and correct the error:
- Verify that a TNSNAMES.ORA file exists and is in the proper place and accessible. See the operating system specific manual for details on the required name and location.
- Check to see that the service name exists in one of the TNSNAMES.ORA files and add it if necessary.
- Make sure there are no syntax errors...
I have checked all three points without result;
I have some doubt about the location of TNSNAMES.ORA that at the moment is the default location.
JDBC is configured properly, and any other Java application that connects to Oracle 8i is working
well.
All the software is on a single machine, and the platform is LINUX.
TNSNAMES.ORA for the Oracle 8i server is:
# TNSNAMES.ORA Configuration #File:/usr/oracle/network/ admin/tnsn ames.ora
# Generated by Oracle configuration tools.
EXTPROC_CONNECTION_DATA.LO CAL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORALIN.LOCALHOST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux)
(PORT = 1521))
)
(CONNECT_DATA =
(SID = oralin)
(SERVICE_NAME = oralin.localhost)
(SRVR = SHARED)
)
)
The settings for TNSNAMES.ORA for the client are basically the same.
I got the same error messages, setting HOST to localhost (127.0.0.1).
Tnsping oralin.localhost works.
That's all! I would be very pleased in receiving
a solution in detail.
Thanks in advance.
I hope someone can help me with the following problem:
As I faced some problems connecting from Weblogic Server to Oracle 8i, using connection pool (please
check question of 7th September, still waiting for answer that solves the problem), I have tried to connect directly from a Java Server Page on Webserver to Oracle 8i, without any pool connection.
I got the following error message:
...java.sql.SQLException: Error while trying to retrieve text for error ORA-12154 ...
ORA-12154 has the following contents:
ORA-12154, 00000, "TNS:could not resolve service name"
// *Cause: The service name specified is not defined correctly in the TNSNAMES.ORA file.
// *Action: Make the following checks and correct the error:
- Verify that a TNSNAMES.ORA file exists and is in the proper place and accessible. See the operating system specific manual for details on the required name and location.
- Check to see that the service name exists in one of the TNSNAMES.ORA files and add it if necessary.
- Make sure there are no syntax errors...
I have checked all three points without result;
I have some doubt about the location of TNSNAMES.ORA that at the moment is the default location.
JDBC is configured properly, and any other Java application that connects to Oracle 8i is working
well.
All the software is on a single machine, and the platform is LINUX.
TNSNAMES.ORA for the Oracle 8i server is:
# TNSNAMES.ORA Configuration #File:/usr/oracle/network/
# Generated by Oracle configuration tools.
EXTPROC_CONNECTION_DATA.LO
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)
ORALIN.LOCALHOST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux)
(PORT = 1521))
)
(CONNECT_DATA =
(SID = oralin)
(SERVICE_NAME = oralin.localhost)
(SRVR = SHARED)
)
)
The settings for TNSNAMES.ORA for the client are basically the same.
I got the same error messages, setting HOST to localhost (127.0.0.1).
Tnsping oralin.localhost works.
That's all! I would be very pleased in receiving
a solution in detail.
Thanks in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This question was finalized today. If more is needed, comment please and I'll return as quickly as I can.
Thank you for your help, Dan, in bringing these Pending items to all of our attention for resolution.
Moondancer - EE Moderator
Thank you for your help, Dan, in bringing these Pending items to all of our attention for resolution.
Moondancer - EE Moderator
You've requested to delete this question, but its status remains as 'Pending Delete' because one or more comments have been added. Normally, the only way to fully delete such a Question is to post a message to Community Support and ask for assistance.
EE is making a one-time database sweep to purge the Pending Delete Questions automatically. During this sweep:
wnotn -- To allow the deletion to proceed: Do nothing.
EXPERTS -- Please DON'T POST a comment except to contest this deletion.
In the future, please refer to https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp#8 for instruction on deleting questions.
DanRollins -- EE database cleanup volunteer