I am using Weblogic: 8.1.1 and on Win 2K. I have created a domain with just the
adminstration server. Now, I am trying to add a JDBC Connection Pool using Oracle
OCI Driver 8.1.7 thru the adminstration console. I have provided a database name,
user name and password for my db, but when I test my connection on the next page,
I get the error "ORA-12154: TNS:could not resolve service name."

tnsping on the command prompt for the database is returning OK.

Does anyone know what I could be doing wrong?

Thanks,
Binil

10-09-2007, 08:36 PM

unix

Re: ORA-12154: TNS:could not resolve service name

Binil Thomas wrote:[color=blue]
> Hi,
>
> I am using Weblogic: 8.1.1 and on Win 2K. I have created a domain with just the
> adminstration server. Now, I am trying to add a JDBC Connection Pool using Oracle
> OCI Driver 8.1.7 thru the adminstration console. I have provided a database name,
> user name and password for my db, but when I test my connection on the next page,
> I get the error "ORA-12154: TNS:could not resolve service name."[/color]

Is the environment variable ORACLE_HOME set for the weblogic process?
What is the tnsnames.ora entry for the DBMS you want, and then show us
the URL and properties you define for the pool. Have you tried the utils.dbping
test to see how we will connect to the DBMS from java?
Lastly, I recommend using the oracle thin driver instead of the OCI-based one.
Joe
[color=blue]
>
> tnsping on the command prompt for the database is returning OK.
>
> Does anyone know what I could be doing wrong?
>
> Thanks,
> Binil[/color]

10-09-2007, 08:36 PM

unix

Resolved (was Re: ORA-12154: TNS:could not resolve service name)

"Binil Thomas" <binil@mailinator.com> wrote:
Hi all,
[color=blue]
>I am using Weblogic: 8.1.1 and on Win 2K. I have created a domain with
>just the
>adminstration server. Now, I am trying to add a JDBC Connection Pool
>using Oracle
>OCI Driver 8.1.7 thru the adminstration console. I have provided a database
>name,
>user name and password for my db, but when I test my connection on the
>next page,
>I get the error "ORA-12154: TNS:could not resolve service name."
>
>tnsping on the command prompt for the database is returning OK.
>
>Does anyone know what I could be doing wrong?[/color]

I got it working. It was a CLASSPATH issue. classes12.zip was not on the CLASSPATH.
I had added it to the command prompt before running to WebLogic startup scripts,
but they were being ignored. When I edited the startup scripts to add the driver
to the CLASSPATH, it is working fine.

Thanks,
Binil

05-07-2011, 06:34 PM

administrator

Re: ORA-12154: TNS:could not resolve service name

Here is a better explanation on how to solve the issue.

[url=http://dbaspot.com/oracle-faq/444781-ora-12154-tns-could-not-resolve-service-name.html]ORA-12154 TNS Could Not Resolve Service Name[/url]