Home » Developer & Programmer » Precompilers, OCI & OCCI » Issue with OCI JDBC using cwallet.sso
Issue with OCI JDBC using cwallet.sso [message #238628] Fri, 18 May 2007 15:35 Go to next message
dapriett
Messages: 3
Registered: May 2007
Junior Member
Hello - our application has been getting this error periodically while connecting to an oracle database using OCI JDBC drivers.

caused by: java.sql.SQLException: ORA-28759: failure to open file

at oracle.jdbc.driver.DatabaseError.throwsSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:681)
at oracle.jdbc.driver.T2CConennection.logon(T2CConnection.java :362)
at oracle.jdbc.driver.PhysicalConnection.<init>
at oracle.jdbc.driver.T2CConnection.<init>
at oracle.jdbc.driver.T2CDriverExtension.getConnection
at oracle.jdbc.driver.OracleDriver.connect
at java.sql.DriverManager.getConnection
at java.sql.DriverManager.getConnection


Once we get this error we keep getting it and are unable to get a connection until we restart it. the file it has the issue with is the cwallet.sso, which I figured out by turning on tracing. The file is there and it gets the connection originally - but for some reason periodically we lose access to that file. But when we get the error the file is there and when we restart the process it's perfectly fine.

The only way we have been able to replicate this error is by create a sameple JAVA app which just keeps opening connections to the database with the wallet without closing the connections. Everytime we hit the 50th connection that error appears and it's unable to get another connection. If we close the connections everytime it's alright.

It's not a limit on the amount of connections to oracle because we have no limit set. The best explaination we can find is that unix has some sort of limit on how many concurrent accesses to that file can be done within one process. We have been unable to figure out that limit. We tried playing around with the file descriptor limits to see if it gets more or less then 50, but no luck.

If anyone has any other suggestions it would be greatly appreciated - we are stuck right now.

Thanks!
Re: Issue with OCI JDBC using cwallet.sso [message #239100 is a reply to message #238628] Mon, 21 May 2007 08:47 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

This ha nothing to do with Common ORA Errors Related to SSL ?
Re: Issue with OCI JDBC using cwallet.sso [message #239126 is a reply to message #238628] Mon, 21 May 2007 09:27 Go to previous messageGo to next message
dapriett
Messages: 3
Registered: May 2007
Junior Member
I've seen that before - thats basically assuming that the file in question is not there and that you never get a connection. In my case the file is there and it gets a connection but for some reason after awhile we lose access to the cwallet.sso file and are unable to gain access again until we restart the process. Not sure if maybe we are accessing it too much and there's some sort of UNIX limit.
Re: Issue with OCI JDBC using cwallet.sso [message #239370 is a reply to message #239126] Tue, 22 May 2007 03:31 Go to previous messageGo to next message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

You probably seen this as well then ?
Quote:
s there any limit on number of connections?

No. As such JDBC drivers doesn't have any scalability restrictions by themselves.

It may be it restricted by the number of 'processes' (in the init.ora file) on the server. However, now-a-days we do get questions that even when the number of processes is 30, we are not able to open more than 16 active JDBC-OCI connections when the JDK is running in the default (green) thread model. This is because the number of per-process file descriptor limit exceeded. It is important to note that depending on whether you are using OCI or THIN, or Green Vs Native, a JDBC sql connection can consume any where from 1-4 file descriptors. The solution is to increase the per-process file descriptor limit.

It is also learnt that, if you are using tns_entry in your URL to open a JDBC-OCI connection instead of a full TNS description, then there could be some limitations. This is because of a bug in SqlNet, that fails in opening tnsname.ora file. The solution is to use full TNS description in the URL instead of the TNS entry.

source
Re: Issue with OCI JDBC using cwallet.sso [message #239515 is a reply to message #239370] Tue, 22 May 2007 09:58 Go to previous messageGo to next message
dapriett
Messages: 3
Registered: May 2007
Junior Member
Well I think we may have figured it out. We noticed that we were getting limited to only 256 file descriptors, even though we have unix set to allow 8192 per process. Come to find out in unix if you run your application in 32-bits (which java was doing by default) then the most you can do is 256 descriptors. By simply starting java with a '-d64' command we were able to fix the problem!
Re: Issue with OCI JDBC using cwallet.sso [message #239518 is a reply to message #239515] Tue, 22 May 2007 10:12 Go to previous message
tahpush
Messages: 961
Registered: August 2006
Location: Stockholm/Sweden
Senior Member

Great news Thumbs Up
Thanks for updating the forum with your solution
Previous Topic: How to Fetch SQL Unicode characters?
Next Topic: Issues with OCI8
Goto Forum:
  


Current Time: Fri Mar 29 04:38:02 CDT 2024