
jaql - issue #96
CatalogImpl does not close properly if no update happens after being opened
What steps will reproduce the problem? 1. Create a CatalogImpl instance 2. open it 3. close it immediately without any update
What is the expected output? What do you see instead? no error should happen
Please use labels and text to provide additional information.
Following exception is thrown out: ERROR [Thread-com.ibm.jaql.server.StartJaqlServer$Monitor] catalog.CatalogImpl: Cannot close JDBC connection java.sql.SQLException: Cannot close a connection while a transaction is still active. 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.generateCsSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.checkForTransactionInProgress(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.close(Unknown Source) at com.ibm.jaql.catalog.CatalogImpl.close(CatalogImpl.java:272) at com.ibm.jaql.server.CatWrapper.close(CatWrapper.java:17) at com.ibm.jaql.server.ServletListener.contextDestroyed(ServletListener.java:29) at org.mortbay.jetty.handler.ContextHandler.doStop(ContextHandler.java:599) at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78) at org.mortbay.jetty.handler.HandlerWrapper.doStop(HandlerWrapper.java:142) at org.mortbay.jetty.Server.doStop(Server.java:281) at org.mortbay.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:78) at com.ibm.jaql.server.StartJaqlServer$Monitor.run(StartJaqlServer.java:190) Caused by: java.sql.SQLException: Cannot close a connection while a transaction is still active. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
Comment #1
Posted on Sep 26, 2010 by Grumpy Bird(No comment was entered for this change.)
Comment #2
Posted on Oct 8, 2010 by Grumpy BirdChanged code to eliminate this error message. The get method was also modified to commit the request if there is a result hit.
Status: Verified
Labels:
Type-Defect
Priority-Medium