[
https://issues.apache.org/jira/browse/OPENJPA-569?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Vincent ASTRUC updated OPENJPA-569:
-----------------------------------
Fix Version/s: (was: 1.0.0)
Environment: Postgres 8.2 database (was: Postgres 8.1 driver,
Postgres 8.2 database)
Affects Version/s: (was: 0.9.0)
(was: 0.9.6)
(was: 0.9.7)
1.0.2
> 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.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.