OpenJPA
  1. OpenJPA
  2. OPENJPA-1869

DB2 Storing Streaming LOBs error / updateClob must not select clob with a cursor in DB2

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0.1
    • Fix Version/s: None
    • Component/s: jdbc
    • Labels:
      None
    • Environment:
      DB2 9.5 LUW

      Description

      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);

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Johannes Mathes
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development