Link to home
Start Free TrialLog in
Avatar of LeTay
LeTay

asked on

Oracle error ORA-12154 with jdbc driver

We are running a server Oracle 8.1.7
The client has the Oracle 8.1.7 client as well
The application uses jdbc (java is 1.4.2) with the classes12.zip provided by Oracle (at client installation)
However, we often get the following error : ORA-12154 could not resolve service name
The problem is intermittent, which I suspect to be a bug in the driver.
Can somebody tell me the precise jdbc version to use and how to know about it ?
Avatar of Acton Wang
Acton Wang
Flag of United States of America image

classes12.zip is the right jar file to use.

if you get this error intermittent, it might be a network problem. you could turn on sql*net trace file or look at the log file to see if any problem.
As a workaround, you can hardcode the full tns description in the
JDBC/OCI connection string. This avoids the need to read the tnsnames.ora file.
This will not eliminate the problem, but should free up more file descriptors for
your use, thus deferring failure until later.

jdbc:oracle:oci8:@(description=(address=(host=pepper)(protocol=tcp)(port=1521))(connect_data=(sid=ORCL)))

is this Sun Solaris?
200253.1
why don't you thin client as:

jdbc:oracle:thin:user/pass@<host>:1521:<db name>

it can avoid the service name.
Avatar of LeTay
LeTay

ASKER

In fact we had the same problem on a separated system (test) running Oracle 9.
The jdbc driver appeared to be buggy and had to be changed.
On the other hand, when there are connection problems, other messages are stacked.
So ?
Avatar of LeTay

ASKER

It is indeed on a Sun Solaris that the client runs
I don't think we can "easily" go without the service name in this application
To say more about this, it is an application that we sell and which is not causing problem, except at one customer site.
ASKER CERTIFIED SOLUTION
Avatar of schwertner
schwertner
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of LeTay

ASKER

I thought that in this case, we should receive an error somewhere like 'too many open files' ?
look at the metalink and it seems to have some workaround
This is the exaxt diagnosys of your situation.
It happens close to 257 connection to the Sun Solaris Server.
Make a request to Sun for workaround.
Oracle is aware for this bug.
Come on, actonwang gave you the perfect (at least temporary) solution - use THIN driver instead of OCI.
Avatar of LeTay

ASKER

Unfortunately our software has not been tested with the thin driver...
well, test it as soon as possible, for me it doesn't sound reasonable to have ORA-12154 could not resolve service name popping from time to time. anyway, there shouldn't be great differences in execution between OCI and THIN.
THIN will open the same connections and of course will read tnsnames.ora, because it also uses connection string that has to be
read from tnsname.ora to be solved.
Another workarount is to put in sqlnet.ora file the line
SQLNET.EXPIRE_TIME = 10

This will delete every 10 minites dead sessions and
if you have luck will decrease the open connections.
>>THIN will open the same connections and of course will read tnsnames.ora, because it also uses connection string that has to be
read from tnsname.ora to be solved

please explain this, schwertner...

plus, you first suggested that it's a problem with files being opened and now you're claiming it's about too many (database?) connections? you lost me...
Avatar of LeTay

ASKER

Friends,
I think that the real problem is a (known) bug in the JBoss middleware that we use for accessing the RDBMS.
Most likely the JBoss does not always do a clean job and the problem occurs, randomly...
What jboss version you have? I guess that you have jboss3...
Avatar of LeTay

ASKER

JBoss 3.2.3
Says that fix is with JBoss 3.2.6
Avatar of LeTay

ASKER

Sorry I mixed up 2 problem
Forget about JBoss bug

Schwertner, why do you think it is a Sun Solaris bug ?
What is exactly the limitation ?
Our configuration does not open more than 50 connections to Oracle,
So this is very below your 255 figure...
Hello LeTay,

I have posted the whole information I have.
If you need evidence, please send me an email.
There are some restrictions that prevent me to
post it here.

Be aware that this OS limitation really exists and is sorted as Sun bug.
Forced accept.

Computer101
EE Admin