openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <>
Subject [jira] Created: (OPENJPA-308) Postgres: bytea vs. oid handling in PreparedStatement.setNull() calls
Date Tue, 07 Aug 2007 00:15:59 GMT
Postgres: bytea vs. oid handling in PreparedStatement.setNull() calls

                 Key: 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(
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800(
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(
at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(
at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(
at org.apache.openjpa.jdbc.kernel.PreparedStatementManagerImpl.flushInternal(
... 39 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message