Skip site navigation (1) Skip section navigation (2)

Couple of preparedstatement bug suspects

From: "Roy Smith" <roy(dot)smith(at)primetext(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Couple of preparedstatement bug suspects
Date: 2008-05-09 03:54:54
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Hi All

I have an app which inserts rows to a table called messages. During load
testing, I'm looping to insert 10,000 rows.
Intermittentently (around 5% and only after the first 6,000 or so) I'm
getting the following Exception...

org.postgresql.util.PSQLException: This statement has been closed.
    at com.primetext.tl2000.dataobjects.Messages.insert(

This smells like a bug. There are other updates within my loop, and I can't
promise that I'm closing all statements. Therefore if this bug is being
triggered by me abusing the driver, please confirm and I'll go through all
of my code ensuring that all preparedstatements are being closed.

However, there is a another aspect of this which smells like an even bigger
Even though the PreparedStatement.executeUpdate is throwing an exception,
the row *is* being written to the database!!
This can't possibly be valid.

best regards


pgsql-jdbc by date

Next:From: Kris JurkaDate: 2008-05-09 04:14:22
Subject: Re: Couple of preparedstatement bug suspects
Previous:From: Kris JurkaDate: 2008-05-08 06:33:24
Subject: Re: Correct getScale() behavior?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group