wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes Strange problem with IBATIS framework and OC4J container Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Strange problem with IBATIS framework and OC4J container" Watch "Strange problem with IBATIS framework and OC4J container" New topic

Strange problem with IBATIS framework and OC4J container

ujjwal soni
Ranch Hand

Joined: Mar 28, 2007
Posts: 403

Today, i faced a strange problem after i deployed my application to LIVE enviornment in OC4J container when i tried to update a bunch of records, it worked fine on 1st time but on updating 3-4 times i got this message and my database server crashed, it is working fine when tried locally in jboss

OrionCMTConnection not closed, check your code!
09/06/18 06:23:45 Logical connection not closed, check your code!
09/06/18 06:23:45 (Use -Djdbc.connection.debug=true to find out where the leaked connection was created)
java.sql.SQLException: Timed out waiting for an available connection after 30 seconds

in finally clause, i am closing my session and connection properly.

Any idea why this is happening ?

Ujjwal B Soni <baroda, gujarat, india> <+918866008962>
"Helping hands are better than praying lips......"
eric givler

Joined: Oct 01, 2009
Posts: 5
Have you gotten any answers with this?

I have a similar situation here. In this case, the account that it's trying to run queries on has been locked out.

The complete log looks like this:

09/10/01 13:54:56 Thr[thread 5]-OrionCMTConnection.isClosed(): end---this.closed = false
09/10/01 13:54:56 Thr[thread 5]-OrionCMTConnection.isClosed(): end
09/10/01 13:54:56 Thr[thread 5]-OrionCMTConnection.finalize(): begin---this:: com.evermind.sql.OrionCMTConnectionFinalize@1982a0a is NOT Closed
09/10/01 13:54:56 OrionCMTConnection not closed, check your code!
09/10/01 13:54:56 Logical connection not closed, check your code!
09/10/01 13:54:56 Created at:
09/10/01 13:54:56 java.lang.Throwable: OrionCMTConnection created
09/10/01 13:54:56 at com.evermind.sql.OrionCMTConnection.<init>(OrionCMTConnection.java:121)
09/10/01 13:54:56 at com.evermind.sql.OrionCMTConnectionFinalize.<init>(OrionCMTConnectionFinalize.java:42)
09/10/01 13:54:56 at com.evermind.util.ClassOptimizerFactory.getOrionCMTConnection(ClassOptimizerFactory.java:80)
09/10/01 13:54:56 at com.evermind.sql.OrionCMTDataSource.getConnection(OrionCMTDataSource.java:237)
09/10/01 13:54:56 at com.evermind.sql.OrionCMTDataSource.getConnection(OrionCMTDataSource.java:217)
09/10/01 13:54:56 at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.init(JdbcTransaction.java:48)
09/10/01 13:54:56 at com.ibatis.sqlmap.engine.transaction.jdbc.JdbcTransaction.getConnection(JdbcTransaction.java:89)
09/10/01 13:54:56 at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithRowHandler(GeneralStatement.java:133)
09/10/01 13:54:56 at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryWithRowHandler(SqlMapExecutorDelegate.java:649)
09/10/01 13:54:56 at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryWithRowHandler(SqlMapSessionImpl.java:156)
09/10/01 13:54:56 at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryWithRowHandler(SqlMapClientImpl.java:133)
09/10/01 13:54:56 at model.persistence.dao.ApplicationDaoImpl.getUnderminedDetails(ApplicationDaoImpl.java:335)
09/10/01 13:54:56 at view.LOVCreator.contextInitialized(LOVCreator.java:52)
09/10/01 13:54:56 at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1009)
09/10/01 13:54:56 at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:549)
09/10/01 13:54:56 at com.evermind.server.Application.getHttpApplication(Application.java:890)
09/10/01 13:54:56 at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:707)
09/10/01 13:54:56 at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:625)
09/10/01 13:54:56 at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:278)
09/10/01 13:54:56 at com.evermind.server.http.HttpServer.setSites(HttpServer.java:278)
09/10/01 13:54:56 at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:179)
09/10/01 13:54:56 at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2394)
09/10/01 13:54:56 at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1551)
09/10/01 13:54:56 at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)
09/10/01 13:54:56 at java.lang.Thread.run(Thread.java:619)

If I find out more, I'll post back to this thread.

eric givler

Joined: Oct 01, 2009
Posts: 5
Did you try adding the -Djdbc.connection.debug to your code?

If you use the -Dtransaction.debug to your code it will print out the stacktrace of when the connection was leaked. Even though I have this, I'm not sure why the code first gets a new connection from the database (in JdbcTransaction.init()), and then later returns to it with a null connection. The connection it is setting is an instance variable for that class, which I'm assuming is part of some iBATIS ThreadScope transaction-based variable.

I agree. Here's the link: http://aspose.com/file-tools
subject: Strange problem with IBATIS framework and OC4J container
It's not a secret anymore!