Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Strange problem with IBATIS framework and OC4J container

 
ujjwal soni
Ranch Hand
Posts: 403
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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 ?

 
eric givler
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
eric givler
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic