closing derby connection in transaction

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

closing derby connection in transaction

Wim  Goossens
Hi Ludovic,

I see in your log file an error trying to close a derby connection.
I do not see it with the oracle connections.
Can you maybe tell me what it means ?

Best Regards
Wim

FINE: closing 1 uncached statement(s)
Feb 27, 2009 12:20:18 PM bitronix.tm.resource.jdbc.JdbcPooledConnection stateChanging
FINE: error trying to close uncached statement org.apache.derby.iapi.jdbc.BrokeredPreparedStatement40@1bb3e9a
java.sql.SQLNonTransientConnectionException: No current connection.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.checkStatus(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedStatement.getFetchDirection(Unknown Source)
        at org.apache.derby.iapi.jdbc.BrokeredStatement.setStatementState(Unknown Source)
        at org.apache.derby.iapi.jdbc.BrokeredPreparedStatement30.createDuplicateStatement(Unknown Source)
        at org.apache.derby.jdbc.XAStatementControl.getRealPreparedStatement(Unknown Source)
        at org.apache.derby.iapi.jdbc.BrokeredPreparedStatement.getPreparedStatement(Unknown Source)
        at org.apache.derby.iapi.jdbc.BrokeredPreparedStatement.getStatement(Unknown Source)
        at org.apache.derby.iapi.jdbc.BrokeredStatement.close(Unknown Source)
        at bitronix.tm.resource.jdbc.JdbcPooledConnection.stateChanging(JdbcPooledConnection.java:217)
        at bitronix.tm.resource.common.AbstractXAStatefulHolder.fireStateChanging(AbstractXAStatefulHolder.java:61)
        at bitronix.tm.resource.common.AbstractXAStatefulHolder.setState(AbstractXAStatefulHolder.java:30)
        at bitronix.tm.resource.common.TransactionContextHelper.requeue(TransactionContextHelper.java:134)
        at bitronix.tm.resource.jdbc.JdbcPooledConnection.release(JdbcPooledConnection.java:146)
        at bitronix.tm.resource.jdbc.JdbcConnectionHandle.close(JdbcConnectionHandle.java:77)
        at be.wg.jx.db.JxConnection.close(JxConnection.java:888)
        at be.wg.jx.db.JxConnection.close(JxConnection.java:87)
        at be.wg.jx.transaction.JxTransaction.commit(JxTransaction.java:125)
        at be.wg.jx.su.di.DICache.clearReferenceid(DICache.java:253)
        at be.cipal.re.x.Listener.jxSessionDestroyed(Listener.java:116)
        at be.wg.jx.web.JxListener.sessionDestroyed(JxListener.java:154)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:702)
        at org.apache.catalina.session.StandardSession.expire(StandardSession.java:660)
        at org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1113)
        at org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:150)
        at org.apache.jsp.main.Logout_jspx._jspService(Logout_jspx.java:440)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
        at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
        at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
        at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
        at be.wg.jx.web.JxSICommon.forward(JxSICommon.java:127)
        at be.wg.jx.web.JxSICommon.forwardQuietly(JxSICommon.java:138)
        at be.wg.jx.web.JxSIAuthentication.handlerLogout(JxSIAuthentication.java:326)
        at be.wg.jx.web.JxSIAuthentication.execute(JxSIAuthentication.java:64)
        at be.wg.jx.web.JxSIDispatcher.execute(JxSIDispatcher.java:332)
        at be.wg.jx.web.JxServlet.doPost(JxServlet.java:64)
        at be.wg.jx.web.JxServlet.doGet(JxServlet.java:77)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: No current connection.
        at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
        at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
        ... 62 more
       
Reply | Threaded
Open this post in threaded view
|

Re: closing derby connection in transaction

Ludovic Orban
Administrator
Hi Wim,

To me it looks like there is a small bug in the Derby version you're using. Normally closing a statement twice should have no effect but in this case Derby doesn't like it.

Maybe I could secure that with a prior call to isClosed() but in the meantime you should not worry: the second close() call is wrapped in a try-catch statement that just logs the error at debug level. This is completely harmless and does not impact stability.