I am trying to provide for users feature to cancel long ruiing queries. I am putting loading data in separate thread and provide GUI to execute cancel query. However when user trying to cancel query ,he gets error ERROR: ORA-01013: user requested cancel of current operation. Then I am receaving long stack trace.
2012-02-03 14:40:34,132 - WARN : SQL Error: 1013, SQLState: 72000 2012-02-03 14:40:34,132 - ERROR: ORA-01013: user requested cancel of current operation java.sql.SQLException: ORA-01013: user requested cancel of current operation java.sql.SQLException: ORA-01013: user requested cancel of current operation
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745) at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219) at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:970) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1072) at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:854) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1154) at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3370) at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3415) at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208) at org.hibernate.loader.Loader.getResultSet(Loader.java:1953) at org.hibernate.loader.Loader.doQuery(Loader.java:802) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) at org.hibernate.loader.Loader.doList(Loader.java:2533) Caused: org.hibernate.QueryTimeoutException: could not execute query at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:124) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.loader.Loader.doList(Loader.java:2536) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276) at org.hibernate.loader.Loader.list(Loader.java:2271) at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716) at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347) at org.ctbto.idc.rn.ross.core.appservices.FlowChartGraphService.retrieveGraphData(FlowChartGraphService.java:111) at org.ctbto.idc.rn.ross.core.datamodel.stationdata.collection.FlowchartGraphCollection.retrieveData(FlowchartGraphCollection.java:49) at org.ctbto.idc.rn.ross.core.datamodel.stationdata.collection.AbstractGraphCollection.retrieveResult(AbstractGraphCollection.java:85) at org.ctbto.idc.rn.ross.core.datamodel.stationdata.collection.AbstractGraphCollection.retrieveResult(AbstractGraphCollection.java:21) at org.ctbto.idc.rn.ross.core.datamodel.stationdata.ComponentDataCollection.retrieveGraphData(ComponentDataCollection.java:140) at org.ctbto.idc.rn.ross.core.datamodel.stationdata.StationDataCollectionManager.retrieveGraphData(StationDataCollectionManager.java:93) at org.ctbto.idc.rn.ross.ui.station.graph.creator.AbstractGraphCreator.retrieveGraphData(AbstractGraphCreator.java:195) at org.ctbto.idc.rn.ross.ui.station.graph.creator.AbstractGraphCreator$AsyncDataLaod.construct(AbstractGraphCreator.java:360) at org.openide.util.AsyncInitSupport.run(AsyncInitSupport.java:168) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Is there any way to cancel query without getting such exceptions?
|