1 Reply Latest reply on Apr 30, 2005 7:57 AM by roger01

    Finder Problem with 3.2.6

    roger01

      Hi,

      I am in the process of moving from 3.2.2 to 3.2.6. I have had my full application running successfully on 3.2.2 for a long time. I am now getting an error the first time I try to access the persistent data with a finder method on the home interface of an entity EJB. The finder method uses at least 3 relationships. I do have row locking on and am using JSDK1.4.2, and PostgreSQL 7.4. The error is:

      10:07:53,956 ERROR [Facades#findFacades] Find failed
      org.postgresql.util.PSQLException: ERROR: SELECT FOR UPDATE is not allowed with DISTINCT clause

      at org.postgresql.util.PSQLException.parseServerError(PSQLException.java:139)

      (with many more lines from the stack trace).




      There is also the following warning that appears just before the above error:

      10:07:53,881 WARN [TxConnectionManager] Prepare called on a local tx. Use of local transactions on a jta transaction with more than one branch may result in inconsistent data in some cases of failure.

      and is repeated 7 times.



      I have read the sections in the manual that seem relevant but they do not appear to have the answer, unless I am missing something.

      Could someone please tell me the solution to this problem (preferably), or give me an ideal about the likely cause or give me some pointers to follow up?

      Cheers
      Roger

        • 1. Re: Finder Problem with 3.2.6
          roger01

          Hi,

          I've found that if I change the row locking tag from "true" to "false" that I overcome the problem. Here is the snippet from jbosscmp-jdbc.xml

          < jbosscmp-jdbc >
          < defaults >
          < row-locking > false < /row-locking >

          I presume the reason that this works is because JBoss only outputs a SELECT statement and not a SELECT FOR UPDATE one.

          Can someone please tell me the implications of leaving row locking set to "false"?

          Ideally, I would like to leave it at the original value of "true". Is there some other parameter that I can set to give me the same effect of inhibiting the output of a SELECT FOR UPDATE SQL statement on read only EQL type methods.


          Thanks in anticipation
          Roger