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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java connection

Status
Not open for further replies.

TheDash

MIS
Joined
Mar 25, 2004
Messages
171
Location
US
Hi,

Can a java application use connection pooling to connect to oracle? One of the applications is trying to get a connection to the database and it is erring out. Stack is

Code:
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.O3log.receive1st(O3log.java:407)
at oracle.jdbc.ttc7.TTC7Protocol.logon TTC7Protocol.java:260)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:360)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:521)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:325)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:141)
at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:171)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:149)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:95)
at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:63)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getNewPoolOrXAConnection(OracleConnectionCacheImpl.java:547)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getPooledConnection(OracleConnectionCacheImpl.java:404)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:298)
at oracle.jdbc.pool.OracleConnectionCacheImpl.getConnection(OracleConnectionCacheImpl.java:268)
at com.bbb.app.getDBConnection(Service.java:1074)
at com.bbb.app.getDBConnection(Service.java:1054)
at com.bbb.app.reportError(Service.java:3636)
at com.bbb.app.query.getResponse(query.java:424)
at com.bbb.app.query.run(query.java:67)


I know of applications that usually use jdbc. I don't think it runs in an appserver. How is it using connection pooling? Please explain in detail. Thank you

 
thats not the whole stack trace is it ?!!

--------------------------------------------------
Free Database Connection Pooling Software
 
Hi,

it is the whole stack trace. There is one last (bottom) line that I forgot to put, it is

at java.lang.Thread.run(Unknown Source)
 
No, there is another line or two at the top ... I've never seen a stack dump beginning "at bla.bla.bla." ... such as :

NullPointerException caused by :
SomeClass.line (a line)
at ...

--------------------------------------------------
Free Database Connection Pooling Software
 
Hi,

it actually starts with

java.sql.SQLException: ORA-00020: maximum number of processes (215) exceeded
 
Well there you go.

You have blown the db stack of processes (connections). I expect you are either :
a) not closing connections
b) not closing statements

(Leaving cursors open would result in a ORA error "maximum cursors/sessions exceeded").

--------------------------------------------------
Free Database Connection Pooling Software
 
Thanks a lot,

Could you clarify these

Is it because of a program bug?
(not closing statements, connections -- is it clear from this stack trace?) OR

Is it because, some other applications/application servers are using connection pooling and they are competing for connections with this program?

If the first is true, what is the best way to debug the program? Please suggest
 
I expect you are either :
a) not closing connections
b) not closing statements

--------------------------------------------------
Free Database Connection Pooling Software
 
>>>>> If the first is true, what is the best way to debug the program? Please suggest

I can assure you it is NOT a fault of connection pooling.
The best way you can debug it is CLOSE YOUR CONNECTIONS !!!

--------------------------------------------------
Free Database Connection Pooling Software
 
Incidentally, if you were using primrose as your connection pooling software, it would tell you the exact code & line that was leaving connections open !!!

--------------------------------------------------
Free Database Connection Pooling Software
 
HI, Can a JDBC thin driver perform connection pooling?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top