Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 2AEB59F9A48 for ; Mon, 17 Sep 2007 19:16:05 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 55018-02 for ; Mon, 17 Sep 2007 19:15:55 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id 854C89F9A3E for ; Mon, 17 Sep 2007 19:16:00 -0300 (ADT) Received: (qmail 5680 invoked by uid 1112); 17 Sep 2007 22:15:58 -0000 Date: Mon, 17 Sep 2007 18:15:58 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Eric Faulhaber cc: pgsql-jdbc@postgresql.org Subject: Re: Batch INSERT failing with error 22P02 In-Reply-To: <46EEE4EF.80608@goldencode.com> Message-ID: References: <46EEE4EF.80608@goldencode.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/87 X-Sequence-Number: 17509 On Mon, 17 Sep 2007, Eric Faulhaber wrote: > I recently upgraded from PG 8.1.8 to 8.2.4. I made a corresponding move in > JDBC driver versions from postgresql-8.1-408.jdbc3.jar to > postgresql-8.2-506.jdbc4.jar (binary distributions in both cases). During a > lengthy import using Hibernate (yes, I realize it's not the most efficient > mechanism for bulk import), I hit the following error: > > SEVERE: ERROR: invalid input syntax for type oid: "" > > Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into > turnaround (turn_number, site, item, purchase_order_number, > purchase_order_line, lot, serial_number, quantity_issued, expiration_date, > id) values (0000XBJG, GSO, 0A0001H9L, 427190, 15, , , -14000.00000, NULL, > 59657893) was aborted. Call getNextException to see the cause. > SEVERE: An SQLException was provoked by the following failure: > java.lang.IllegalArgumentException: Can't change resolved type for param: 7 > from 1043 to 26 > .... We've seen this report once before, but weren't able to get to the bottom of it because it also occurred on a large dataset. http://archives.postgresql.org/pgsql-jdbc/2007-06/threads.php#00041 In his case int4 and int8 were getting mixed up which is a little more understandable, in your case it's confusing varchar and oid which seems less likely. Is there any chance you can run this with the URL parameter loglevel=2, which will produce tons of logging information, or can you make this test case available to me? Kris Jurka