Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 80844 invoked from network); 7 Aug 2007 00:16:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Aug 2007 00:16:20 -0000 Received: (qmail 37448 invoked by uid 500); 7 Aug 2007 00:16:19 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 37414 invoked by uid 500); 7 Aug 2007 00:16:19 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 37405 invoked by uid 99); 7 Aug 2007 00:16:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2007 17:16:18 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Aug 2007 00:16:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1746871403E for ; Mon, 6 Aug 2007 17:15:59 -0700 (PDT) Message-ID: <21126297.1186445759069.JavaMail.jira@brutus> Date: Mon, 6 Aug 2007 17:15:59 -0700 (PDT) From: "Patrick Linskey (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-308) Postgres: bytea vs. oid handling in PreparedStatement.setNull() calls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Postgres: bytea vs. oid handling in PreparedStatement.setNull() calls --------------------------------------------------------------------- Key: OPENJPA-308 URL: https://issues.apache.org/jira/browse/OPENJPA-308 Project: OpenJPA Issue Type: Bug Components: jdbc Affects Versions: 0.9.7, 0.9.6, 0.9.0 Environment: Postgres 8.1 driver, Postgres 8.2 database Reporter: Patrick Linskey Fix For: 1.0.0 I'm seeing the following error when running against Postgres. This is solved by intercepting the DBDictionary.setNull() call and replacing Types.BLOB with Types.BINARY. Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: column "image" is of type bytea but expression is of type oid {prepstmnt 33517025 INSERT INTO LAZ_Product (id, image, name, price) VALUES (?, ?, ?, ?) [params=(long) 1186442009345, (null) null, (String) Browser Spiffer-Upper, (float) 31.5]} [code=0, state=42804] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800(LoggingConnectionDecorator.java:57) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:858) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1363) at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(PreparedStatementManagerImpl.java:95) ... 39 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.