Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 18834 invoked from network); 12 Apr 2008 14:04:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Apr 2008 14:04:03 -0000 Received: (qmail 53234 invoked by uid 500); 12 Apr 2008 14:04:02 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 53209 invoked by uid 500); 12 Apr 2008 14:04:02 -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 53198 invoked by uid 99); 12 Apr 2008 14:04:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 07:04:02 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 12 Apr 2008 14:03:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0EB5F234C0BC for ; Sat, 12 Apr 2008 07:01:05 -0700 (PDT) Message-ID: <1730592665.1208008865045.JavaMail.jira@brutus> Date: Sat, 12 Apr 2008 07:01:05 -0700 (PDT) From: "Vincent ASTRUC (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-569) CLONE -Postgres: bytea vs. oid handling in PreparedStatement.setNull() calls In-Reply-To: <1736529111.1208008744780.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12588238#action_12588238 ] Vincent ASTRUC commented on OPENJPA-569: ---------------------------------------- I have this error with version 1.0.2 and Postgre 8.2 : org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: column "administrateddata" is of type bytea but expression is of type oid {prepstmnt 25070683 INSERT INTO USERS (OID, ADMINISTRATEDDATA, CLASSIFICATION, LOGIN, MODIFICATIONDATETIME, PASSWORD, PREFERENCES, PREFERENCESDATETIME, ROLE, JDOCLASS, JDOVERSION) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(long) 1002865354472414137, (null) null, (null) null, (String) test, (null) null, (null) null, (null) null, (null) null, (String) Default, (String) com.thalesgroup.isr.common.mdd.TypeUsersImpl, (int) 1]} [code=0, state=42804] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:191) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800(LoggingConnectionDecorator.java:56) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:857) 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) > CLONE -Postgres: bytea vs. oid handling in PreparedStatement.setNull() calls > ---------------------------------------------------------------------------- > > Key: OPENJPA-569 > URL: https://issues.apache.org/jira/browse/OPENJPA-569 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 1.0.2 > Environment: Postgres 8.1 driver, Postgres 8.2 database > Reporter: Vincent ASTRUC > > 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.