Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TWUff-0002d8-Ul for pgsql-jdbc@postgresql.org; Thu, 08 Nov 2012 16:09:36 +0000 Received: from outbound.vnet-inc.com ([216.146.104.103]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TWUfY-0008QV-Nw for pgsql-jdbc@postgresql.org; Thu, 08 Nov 2012 16:09:34 +0000 Received: from [192.168.157.132] (unknown [76.75.27.41]) by outbound.vnet-inc.com (Postfix) with ESMTP id 1FF7E5A1B; Thu, 8 Nov 2012 09:09:27 -0700 (MST) Message-ID: <509BD654.5030500@ttc-cmc.net> Date: Thu, 08 Nov 2012 08:57:08 -0700 From: dmp User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.13) Gecko/20100914 SeaMonkey/2.0.8 MIME-Version: 1.0 To: Peter Cooner , pgsql-jdbc@postgresql.org Subject: Re: Possible bug / regression from generated keys References: <509A8FDC.6040403@ttc-cmc.net> <509A989D.5020108@ttc-cmc.net> <509B0539.1050601@ttc-cmc.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201211/33 X-Sequence-Number: 23500 Ater some thought I'm in agreement with Dave. The backend must be sending an unexpected value that can not be converted. Peter can you please send a post of the core prepare commit code that is used to create these batches along with the exact place in your code before the PSQLExceptions codes are given. I assume from your original post that would include the getGeneratedKeys() that you indicated is the place the error occurs for the ResultSet? A simple test code case to recreate the error would be of course best. danap. Peter Cooner wrote: > OK, so here is the batch info: > > batch number, number of rows > 1, 2 > 2, 3 > 3, 4 > 4, 4 - failed on row 4 - PSQLException: Bad value for type long : > 5, 3 - failed on row 3 - PSQLException: Bad value for type long : > 6, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4 > 7, 4 > 8, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4 > 9, 2 > 10, 3 > 11, 4 > 12, 3 - failed on row 3 - PSQLException: Bad value for type long : = > 13, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4 > 14, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4 > 15, 4 - failed on row 4 - PSQLException: Bad value for type long : M > 16, 1 - failed on row 1 - ArrayIndexOutOfBoundsException: 4 > > Always on column 1, position_id > > > Normally I would expect the batches to be larger, but I've reduced the > data speed for testing. > > > > Dave Cramer wrote: >> So I had a quick look at the code and the only way it gets into this >> code is through a test which is essentially >> >> if ( isBinary and isINT8 ) >> >> So unless the backend is sending an int8 as less than 8 bytes or there >> is some other bug in the JDBC code in which it gets confused as to what >> it is pointing to I don't see how it gets to this exception. >> >> Dave