db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Kartha <karth...@gmail.com>
Subject Re: SQLException: The heap container with container id Container(-1, 1157060695837) is closed.
Date Wed, 13 Sep 2006 05:00:36 GMT
BALDWIN, ALAN J [AG-Contractor/1000] wrote:

>Michael,
>Thanks for the responses.  Here is what I know so far:
>
>** There is no other finally block that would close that result set.  The
>only operations that happen on that result set (other than the finally block
>you saw) are rs.getString(), rs.getInt(), etc...
>
>** I am quite certain that this is not your run-of-the mill jdbc error.  I
>would not be posting here if I thought it were.  
>
>** I can switch the order of the inner join clauses and reproduce this on
>datasets that previously had no problem.  For example:
>
>//This returns data:
>SELECT * FROM DeliveryNotification dn 
>INNER JOIN DealerTransaction dt ON dn.InventoryTransactionID =
>dt.TransactionId 
>INNER JOIN Product p ON p.ProductUPC = dn.ProductUPC AND p.SeedYear =
>dn.SeedYear
>//more joins here...
>
>//This throws the exception:
>SELECT * FROM DealerTransaction dt 
>INNER JOIN DeliveryNotification dn ON dn.InventoryTransactionID =
>dt.TransactionId
>INNER JOIN Product p ON p.ProductUPC = dn.ProductUPC AND p.SeedYear =
>dn.SeedYear
>//more joins here...
>
>We have one DealerTransaction row to many DeliveryNotification rows.  The
>joins following those three tables are mostly just lookup data (status
>tables and such... our database is very normalized), and they remain
>unchanged in both versions of this query.
>
>To me, this smells like something out of my control (jdbc driver, database
>engine?) is running out of resources.  This seems to be more frequent the
>larger the dataset gets.  This dataset for example, contains about 250
>DealerTransaction rows, ~1000 DeliveryNotification rows, and ~5000 products.
>Is this large by Derby standards?
>
>Regards,
>-Alan-
>  
>
Hi Alan,

The amount of data that you have mentioned is really minimal.  We have 
run tests on Derby using joins of multiple tables (~64) and views with
huge amount of data - 500K ( see 
http://issues.apache.org/jira/browse/DERBY-805  in JIRA, for example). I 
am sure there are many users out there
who are using  Derby is much complex scenarios. It is really strange you 
are hitting this error.

I assume your app is a simple JDBC one without  any object-relational 
mapper (Hibernate etc.) in between.
Following your email thread and based on the details you have provided I 
tried re-creating the issue but was not successful. Attached is my
simple app. I noticed the data types you are using are pretty straight 
forward so I have stuck to those. However  I keep coming
across the 'data-dependent' issue in your thread, which seems unclear to 
me as to what data to use in the  repro. Moroever it is not clear
what type of isolation level, type of ResultSet (scrollable etc.) is 
being used.

Is it possible that you can create a simple reproduction (could modify 
the attached script to suit your needs) and create a JIRA issue.
This would be really really benefical in getting to the core of the problem.

-Rajesh





Mime
View raw message