Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ORA-12154: TNS:could not resolve service name

Status
Not open for further replies.

cjfogg

Technical User
Aug 13, 2003
1
NL
I'm running the following on the same Solaris 8 machine (same user):

Oracle 9i (9.0.1.4) database client
Oracle 9iAS (9.0.3 - J2EE & Web Cache)

and I am having difficulty in setting up the environment correctly. I have created an OC4J data source (type II driver) and get the following error when I attempt to use it to access my database:

SQLException java.sql.SQLException: ORA-12154: TNS:could not resolve service name
:fwcsPooledDS

fwcsPooledDS relates to the data source - it is not the SID.

How should I set up my environment to make both Oracle products happy? The 9iAS Containers for J2EE Services Guide suggested that I would need to do the following:

* install the Oracle Client on the same machine on which OC4J is installed
* set the ORACLE_HOME variable
* set LD_LIBRARY_PATH (or the equivalent environment variable for your OS) to $ORACLE_HOME/lib
* set TNS_ADMIN to a valid Oracle administration directory with a valid tnsnames.ora file

I followed these steps (setting ORACLE_HOME to point to the app server and TNS_ADMIN to point to the database client's network/admin directory). I have read conflicting reports about whether ORACLE_HOME should be set at all on a system with multiple Oracle products installed.

This is my data source:

class="com.evermind.sql.DriverManagerDataSource" location="jdbc/fwcsCoreDS"
pooled-location="jdbc/fwcsPooledDS"
password="csuser"
min-connections="10"
username="csuser"
url="jdbc:eek:racle:eek:ci8:mad:hermione"
xa-location="jdbc/xa/fwcsXADS"
connection-driver="oracle.jdbc.driver.OracleDriver"
schema="database-schemas/oracle.xml"
max-connections="100"
name="fwcs"
ejb-location="jdbc/fwcsDS"

Can anyone advise me where I am going wrong? I don't want to give up on this and use the thin driver...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top