X-Original-To: pgsql-jdbc@postgresql.org Received: from wabe.stix.wins (89-206.mxp.dsl.internl.net [217.149.206.89]) by svr1.postgresql.org (Postfix) with ESMTP id C918F5E4818 for ; Tue, 24 Aug 2004 07:02:30 -0300 (ADT) Received: from tove.stix.wins (tove.stix.wins [192.168.1.4]) by wabe.stix.wins (8.12.11/8.12.11) with ESMTP id i7OA2WAD031044 for ; Tue, 24 Aug 2004 12:02:32 +0200 From: Jaap Bril To: pgsql-jdbc@postgresql.org Subject: I do not understand the exception Date: Tue, 24 Aug 2004 12:02:31 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200408241202.31945.Jaap.Bril@inter.nl.net> X-Archive-Number: 200408/142 X-Sequence-Number: 10864 I dont get the error here, the exception is SQLEXCEPTION:Storing thumbnail failed: java.sql.SQLException: ERROR: Bad int8 external representation "\377\330\377\340\ [.........] The offending code is: private void storeThumbnail(ConnectionPool connectionPool, byte[] tn) { String thumbnail_insert = "INSERT INTO thumbnails VALUES (?)"; try { dbConn = connectionPool.getConnection(); dbConn.setAutoCommit(false); PreparedStatement ps = dbConn.prepareStatement(thumbnail_insert); ps.setBytes(1, tn); ps.executeUpdate(); ps.close(); } catch (SQLException e){ System.out.println("SQLEX:Storing thumbnail failed: " + e ); } } tn is a ByteArrayOutputStream().toByteArray() filled with a JPEGCodec.createJPEGEncoder() The table thumbnails has a bytea and a serial; What can be wrong?? TIA Jaap