omkardash / jaql

Automatically exported from code.google.com/p/jaql
0 stars 0 forks source link

CatalogImpl does not close properly if no update happens after being opened #96

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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)

Original issue reported on code.google.com by liu.chuanjie@gmail.com on 25 Sep 2010 at 9:47

GoogleCodeExporter commented 9 years ago

Original comment by liu.chuanjie@gmail.com on 26 Sep 2010 at 5:45

GoogleCodeExporter commented 9 years ago
Changed code to eliminate this error message. The get method was also modified 
to commit the request if there is a result hit.

Original comment by liu.chuanjie@gmail.com on 8 Oct 2010 at 8:36