You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fischer (JIRA)" <ji...@apache.org> on 2006/05/01 16:45:46 UTC

[jira] Created: (TORQUE-8) village does not close every resultSet it opens

 village does not close every resultSet it opens
------------------------------------------------

         Key: TORQUE-8
         URL: http://issues.apache.org/jira/browse/TORQUE-8
     Project: Torque
        Type: Bug

  Components: Runtime  
    Versions: 3.2, 3.1.1, 3.1, 3.0    
    Reporter: Thomas Fischer


In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle Thanks to Hendrik Busch for reporting the error.

This issue corresponds to Scarab issue TRQS291. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Updated: (TORQUE-8) village does not close every resultSet it opens

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-8?page=all ]

Thomas Fischer updated TORQUE-8:
--------------------------------

    Old Scarab Id: TRQS291
      Description: In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.  (was: In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle Thanks to Hendrik Busch for reporting the error.

This issue corresponds to Scarab issue TRQS291. )

>  village does not close every resultSet it opens
> ------------------------------------------------
>
>          Key: TORQUE-8
>          URL: http://issues.apache.org/jira/browse/TORQUE-8
>      Project: Torque
>         Type: Bug

>   Components: Runtime
>     Versions: 3.2, 3.1.1, 3.1, 3.0
>     Reporter: Thomas Fischer

>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Assigned: (TORQUE-8) village does not close every resultSet it opens

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl reassigned TORQUE-8:
-----------------------------------

    Assignee: Thomas Vandahl

>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: https://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.0, 3.1, 3.1.1, 3.2
>            Reporter: Thomas Fischer
>            Assignee: Thomas Vandahl
>         Attachments: village-2.0-TORQUE-8.patch, village-3.3-TORQUE-8.patch
>
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Resolved: (TORQUE-8) village does not close every resultSet it opens

Posted by "Thomas Vandahl (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl resolved TORQUE-8.
---------------------------------

    Fix Version/s: 3.3.1
       Resolution: Fixed

Applied patch and some cleanup

>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: https://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.0, 3.1, 3.1.1, 3.2
>            Reporter: Thomas Fischer
>            Assignee: Thomas Vandahl
>             Fix For: 3.3.1
>
>         Attachments: village-2.0-TORQUE-8.patch, village-3.3-TORQUE-8.patch
>
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Closed: (TORQUE-8) village does not close every resultSet it opens

Posted by "Scott Eade (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Scott Eade closed TORQUE-8.
---------------------------

    Resolution: Cannot Reproduce
      Assignee: Scott Eade

>From http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSet.html#close():

> Note: A ResultSet object is automatically closed by the Statement object that generated it when that Statement object is closed, re-executed, or is used to retrieve the next result from a sequence of multiple results. A ResultSet object is also automatically closed when it is garbage collected.

Both Schema and Record invoke stmt.close(), thus closing the ResultSet.

I have added a test case to Village and do not run out of connections.


>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: https://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.0, 3.1, 3.1.1, 3.2
>            Reporter: Thomas Fischer
>            Assignee: Scott Eade
>         Attachments: village-2.0-TORQUE-8.patch
>
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Commented: (TORQUE-8) village does not close every resultSet it opens

Posted by "Brendan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TORQUE-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559192#action_12559192 ] 

Brendan Miller commented on TORQUE-8:
-------------------------------------

Has anyone looked at this?  We ran into the "too many open cursors" error recently.  A quick patch to the Village 2.0 source as attached seemed to straighten it out.  Now that Village has been integrated, it should be easy enough to patch the 3.3RC3 village-under-torque-umbrella.

>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: https://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.0, 3.1, 3.1.1, 3.2
>            Reporter: Thomas Fischer
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Updated: (TORQUE-8) village does not close every resultSet it opens

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/TORQUE-8?page=all ]

Thomas Fischer updated TORQUE-8:
--------------------------------

    Component/s: Village

>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: http://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.2, 3.1.1, 3.1, 3.0
>            Reporter: Thomas Fischer
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Reopened: (TORQUE-8) village does not close every resultSet it opens

Posted by "Thomas Fischer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fischer reopened TORQUE-8:
---------------------------------

      Assignee:     (was: Scott Eade)

The issue is not fixed.

a) the problem still exists that resultSet.close() is not called on open ResultSets and Statements. In some cases this is not a problem because the garbage collector usually closes open ResultSets and Statements if they are garabege collected or the underlying connection closes its resultSet if it is closed, but in some other (not rare) cases this does not work. It is difficult to reproduce the issue because the garbage collector's policy can not be influenced in the necessary ways, so not being able to reproduce the error does not mean it is fixed.

b) The appended patch solves the problem only in cases where the executed query succeeds. In cases where the query does not succed a non-closed statements remains lingering about. One clean solution would be using a try...finally block, like

Statement statement = null
RecordSet recordSet = null;
try
{
   // fill and use recordset and statement
}
finally
{
  if (recordSet != null)
  {
    try
    {
      recordSet.close();
    }
    catch (SQLException e)
    {
      // log and/or discard e
    }
  }
  if statement != null)
  {
    try
    {
      statement.close();
    }
    catch (SQLException e)
    {
      // log and/or discard e
    }
  }
}



>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: https://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.0, 3.1, 3.1.1, 3.2
>            Reporter: Thomas Fischer
>         Attachments: village-2.0-TORQUE-8.patch
>
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Updated: (TORQUE-8) village does not close every resultSet it opens

Posted by "Bardouillet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bardouillet updated TORQUE-8:
-----------------------------

    Attachment: village-3.3-TORQUE-8.patch

Patch for village 3.3 provided

>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: https://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.0, 3.1, 3.1.1, 3.2
>            Reporter: Thomas Fischer
>         Attachments: village-2.0-TORQUE-8.patch, village-3.3-TORQUE-8.patch
>
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Commented: (TORQUE-8) village does not close every resultSet it opens

Posted by "Brendan Miller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TORQUE-8?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12910188#action_12910188 ] 

Brendan Miller commented on TORQUE-8:
-------------------------------------

If I was allowed, I would vote this one up.  Is there likely to be a 3.3.1 release?

>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: https://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.0, 3.1, 3.1.1, 3.2
>            Reporter: Thomas Fischer
>            Assignee: Thomas Vandahl
>             Fix For: 3.3.1
>
>         Attachments: village-2.0-TORQUE-8.patch, village-3.3-TORQUE-8.patch
>
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Updated: (TORQUE-8) village does not close every resultSet it opens

Posted by "Brendan Miller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TORQUE-8?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brendan Miller updated TORQUE-8:
--------------------------------

    Attachment: village-2.0-TORQUE-8.patch

My svn path for this patch is http://svn.softwareforge.de/svn/opensource/village/tags/village_2.0
I recognize Torque has integrated this code, but we are still using the village-2.0.jar (presumably) built from this source.


>  village does not close every resultSet it opens
> ------------------------------------------------
>
>                 Key: TORQUE-8
>                 URL: https://issues.apache.org/jira/browse/TORQUE-8
>             Project: Torque
>          Issue Type: Bug
>          Components: Runtime, Village
>    Affects Versions: 3.0, 3.1, 3.1.1, 3.2
>            Reporter: Thomas Fischer
>         Attachments: village-2.0-TORQUE-8.patch
>
>
> In the village classes Record and Schema, ResultSets are opened which are not closed afterwards. This can lead to a "too many open cursors" error in oracle. Thanks to Hendrik Busch for reporting the error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org