6 Replies Latest reply on Jun 22, 2004 5:08 AM by cslenkey

    ORA-01786: FOR UPDATE of this query expression is not allowe

    cslenkey

      Hi,

      We have an EJB application wich is running now in JBoss-3.2.2RC3.
      I would like to use this on JBoss-3.2.4RC1 because I have read in the forum
      that there is a solution to use JOINs and SUBSELECT in querys.
      When we are running our application we get the:
      ORA-01786: FOR UPDATE of this query expression is not allowed
      Oracle error.
      When I analized the server log of 3.2.3 and 3.2.4 I found the difference.
      The SQL select which was generated by the previous version is the next:
      SELECT DISTINCT t0_d.berletId, t0_d.berletNyk, t0_d.szeriaszam,
      t0_d.megnevezes, t0_d.ervenyessegTol, t0_d.ervenyessegIg,
      t0_d.eloadasSzam FROM BERLET t0_d WHERE ((t0_d.berletNyk = ?)) OR
      ((t0_d.berletNyk = ?))

      The new version generates the same SQL code with an FOR UPDATE at
      end of the SQL which command generates the ORA-1786 error.

      Every SQL has the same FOR UPDATE ending which comes from a finder method.

      I try to run this SQL in a simple SQL prompt but same situation.
      What has changed? Why does differ the two SQL? I have not change any configuration of JBoss?
      Thanks,
      Csaba