[ 
https://issues.apache.org/jira/browse/OPENJPA-1869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Richard Zowalla resolved OPENJPA-1869.
--------------------------------------
    Resolution: Fixed

Already fixed on master: 7450df02a (OPENJPA-1699, on master): 
DB2Dictionary.java:1076-1105 binds the stream directly in 
insertBlob/ClobForStreamingLoad, and updateBlob/updateClob are no-ops, so the 
FOR UPDATE select of the LOB no longer runs. Closing; please reopen if this 
still happens with OpenJPA 4.x.

> DB2 Storing Streaming LOBs error / updateClob must not select clob with a 
> cursor in DB2
> ---------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1869
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1869
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>    Affects Versions: 2.0.1
>         Environment: DB2 9.5 LUW
>            Reporter: Johannes Mathes
>            Priority: Major
>
> I am trying to persist a streaming lob as written in the documentation. 
> When I flush my session, I get the following: Caused by: 
> org.apache.openjpa.lib.jdbc.ReportingSQLException: DB2 SQL Error: 
> SQLCODE=-270, SQLSTATE=42997, SQLERRMC=53, DRIVER=3.58.82 {prepstmnt 27511927 
> SELECT t0.GMRU_LOG, t0.GMRU_NAME FROM MEASURES.GMRU_GO_METER_RUN t0 WHERE 
> t0.GMRU_NAME = ?  FOR READ ONLY WITH RS USE AND KEEP UPDATE LOCKS [params=?]} 
> [code=-270, state=42997]
> According to :
> http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.apdv.java.doc/doc/tjvrsush.htm
> it is not allowed to do a cursor fetch for lob attributes. However, this is 
> done in order to ensure that there is a lock:
>  public void updateClob { ... 
> stmnt = sql.prepareStatement(conn, store.getFetchConfiguration(),
>                                       ResultSet.TYPE_SCROLL_SENSITIVE, 
> ResultSet.CONCUR_UPDATABLE);



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to