|
Ok. A 5-6 table join? Outch! (That’s a
pretty wide join.) Ok, Can you add some System.out.println
statements ? Also try commenting out the DBHelper.closeResources(ps,
rs); statement. Based on the error, you’re
attempting to get something from the result set after its closed. And this is
the only place that you’re intentionally closing the result set. Also you said that this is data dependent.
So I’m wondering which code blocks are being hit. Is the transaction usually null or not
null? -Mike From: BALDWIN, ALAN J
[AG-Contractor/1000] [mailto:[EMAIL PROTECTED] The weird thing with this is that it seems
to be data dependent. This code has been in use (unchanged) for some time
now, and has only today started breaking with a specific dataset, which is
around 60 rows joined across 5-6 tables. -Alan Baldwin- -----Original Message----- Michael, Here is the java code
block… Neither the
processTransactionResultSetRow() nor the lineItemDao.processResultSetRow()
methods close the resultset. In fact, they are included below.
rs = ps.executeQuery();
Map transactionSet = new HashMap();
while (rs.next())
{
//BOMBS
Long id = new Long(rs.getLong("TransactionId"));
DealerTransaction transaction = (DealerTransaction) transactionSet.get(id);
if (transaction == null) {
transaction = processTransactionResultSetRow(rs);
transactionSet.put(id, transaction);
dealerTransactions.add(transaction);
}
transaction.addLineItem(lineItemDao.processResultSetRow(rs, connection));
} } finally
{
DBHelper.closeResources(ps, rs); } ===================== private DealerTransaction
processTransactionResultSetRow(ResultSet rs) throws SQLException {
DealerTransaction dealerTransaction = new DealerTransaction(rs.getLong("TransactionId"),
rs.getDate("TransactionDate"), rs.getInt("SeedYear"),
rs.getString("ShipToName"), rs.getString("ShipFromName"));
dealerTransaction.setPoNumber(rs.getString("PONumber"));
dealerTransaction.setBolNumber(rs.getInt("BillOfLadingNumber"));
dealerTransaction.setTransactionToFrom(rs.getString("TransactionToFrom"));
dealerTransaction.setSoldToId(rs.getString("SoldToID"));
dealerTransaction.setSoldToIdType(rs.getString("SoldToIdType")); dealerTransaction.setPlantCode(rs.getString("PlantCode"));
dealerTransaction.setPlantName(rs.getString("PlantName"));
dealerTransaction.setTransactionNumber(rs.getString("TransactionNumber"));
dealerTransaction.setShipToId(rs.getString("ShipToID"));
dealerTransaction.setShipToIdType(rs.getString("ShipToIdType"));
dealerTransaction.setSoldToName(rs.getString("SoldToName")); return
dealerTransaction; } ==================== DealerTransactionDetail
processResultSetRow(ResultSet rs, Connection connection) throws SQLException { Dealer
affiliate = dealerDao.loadDealer(connection,
rs.getString("AffiliateIRDAccountId"));
Product product = productDao.loadProduct(connection,
rs.getString("ProductUPC"), rs.getInt("SeedYear"));
DealerTransactionDetail dealerTransactionDetail = new
DealerTransactionDetail(rs.getInt("ItemNumber"), rs
.getInt("Quantity"), DBHelper.getYesNo(rs, "IsVoided"),
product, rs.getString("TransactionTypeName"), rs
.getString("StatusName"), rs.getInt("SeedYear"));
dealerTransactionDetail.setOriginalUnits(rs.getFloat("SapQuantity"));
dealerTransactionDetail.setDamagedQuantity(rs.getFloat("DamagedQuantity"));
dealerTransactionDetail.setLotNumber(rs.getString("LotNumber"));
dealerTransactionDetail.setAffiliateDealer(affiliate);
dealerTransactionDetail.setLocation(rs.getString("Location"));
dealerTransactionDetail.setComment(rs.getString("DeliveryComment"));
dealerTransactionDetail.setSeedSize(rs.getString("SeedSize"));
dealerTransactionDetail.setUserDate(rs.getDate("UserDate"));
dealerTransactionDetail.setProductSapId(rs.getLong("ProductSapId"));
dealerTransactionDetail.setSapUom(rs.getString("SapUnitOfMeasure")); return
dealerTransactionDetail; } Thanks! -Alan Baldwin- -----Original Message----- Can you
provide some code of the loop? It
sounds like you’re closing out the result set. But hey!
What do I know? From: BALDWIN,
ALAN J [AG-Contractor/1000] [mailto:[EMAIL PROTECTED] Hello all, I'm running a query from java that throws the
exception in the subject. The code that fails is
when
calling rs.next() *on the second
iteration only*. I can't seem to find anything on the web
regarding this error. Could someone point me in the right
direction? Regards, Alan Baldwin This e-mail message may contain
privileged and/or confidential information, and is intended to be received only
by persons entitled to receive such information. If you have received this
e-mail in error, please notify the sender immediately. Please delete it and all
attachments from any servers, hard drives or any other media. Other use of this
e-mail by you is strictly prohibited. All e-mails and attachments sent and
received are subject to monitoring, reading and archival by Monsanto. The
recipient of this e-mail is solely responsible for checking for the presence of
"Viruses" or other "Malware". Monsanto accepts no liability
for any damage caused by any such code transmitted by or accompanying this
e-mail or any attachment. This e-mail message may contain
privileged and/or confidential information, and is intended to be received only
by persons entitled to receive such information. If you have received this
e-mail in error, please notify the sender immediately. Please delete it and all
attachments from any servers, hard drives or any other media. Other use of this
e-mail by you is strictly prohibited. All e-mails and attachments sent and
received are subject to monitoring, reading and archival by Monsanto. The
recipient of this e-mail is solely responsible for checking for the presence of
"Viruses" or other "Malware". Monsanto accepts no liability
for any damage caused by any such code transmitted by or accompanying this
e-mail or any attachment. This e-mail message may contain privileged and/or confidential
information, and is intended to be received only by persons entitled to receive
such information. If you have received this e-mail in error, please notify the
sender immediately. Please delete it and all attachments from any servers, hard
drives or any other media. Other use of this e-mail by you is strictly
prohibited. All e-mails and attachments sent and received are subject to monitoring,
reading and archival by Monsanto. The recipient of this e-mail is solely
responsible for checking for the presence of "Viruses" or other
"Malware". Monsanto accepts no liability for any damage caused by any
such code transmitted by or accompanying this e-mail or any attachment. |
Title: SQLException: The heap container with container id Container(-1,
1157060695837) is closed.
- SQLException: The heap container with... BALDWIN, ALAN J [AG-Contractor/1000]
- RE: SQLException: The heap conta... derby
- RE: SQLException: The heap conta... BALDWIN, ALAN J [AG-Contractor/1000]
- RE: SQLException: The heap conta... BALDWIN, ALAN J [AG-Contractor/1000]
- RE: SQLException: The heap c... derby
- Re: SQLException: The heap c... Mike Matrigali
- RE: SQLException: The he... Michael Segel
- RE: SQLException: The heap conta... BALDWIN, ALAN J [AG-Contractor/1000]
- Re: SQLException: The heap c... Rajesh Kartha
- RE: SQLException: The heap c... Michael Segel
