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 ?
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 ?
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:@(descrip tion=(addr ess=(host= pepper)(pr otocol=tcp )(port=152 1))(connec t_data=(si d=ORCL)))
is this Sun Solaris?
200253.1
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:@(descrip
is this Sun Solaris?
200253.1
why don't you thin client as:
jdbc:oracle:thin:user/pass @<host>:15 21:<db name>
it can avoid the service name.
jdbc:oracle:thin:user/pass
it can avoid the service name.
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 ?
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 ?
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.
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.
if you use thick JDBC driver, it might have a problem, refer to this metalink:
https://metalink.oracle.com/metalink/plsql/f?p=130:15:1249420728093263441::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,2060739,1,1,1,helvetica
https://metalink.oracle.com/metalink/plsql/f?p=130:15:1249420728093263441::::p15_database_id,p15_docid,p15_show_header,p15_show_help,p15_black_frame,p15_font:BUG,2060739,1,1,1,helvetica
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
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.
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...
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...
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...
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...
ASKER
JBoss 3.2.3
Says that fix is with JBoss 3.2.6
Says that fix is with JBoss 3.2.6
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...
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.
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
Computer101
EE Admin
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.