7 Replies Latest reply: Mar 17, 2013 4:03 AM by Jan Vervecken RSS

    Signal Row Modified By Another User Exception Even When AMPooling Disabled

    Jan Vervecken
      hi

      (in the context of issue ADFEMG-62 [1] about no RowInconsistentException and (automatic) "lost update" detection [2])

      Please consider the sample application from Steve Muench, SignalRowModifiedByAnotherUserExceptionEvenWhenAMPoolingDisabled.zip [3], for which some explanation exists [4].

      Only adding navigation buttons "Next" and "Previous" (using JDeveloper 11.1.1.6.0) allows to show some strange behaviour, in SignalRowModifiedByAnotherUserExceptionEvenWhenAMPoolingDisabled-v20130212.zip [5].

      It is important to note that the test.model.AppModule Application Module configuration has the "Enable Application Module Pooling" checkbox unchecked (resulting in property jbo.ampool.doampooling to have value false).

      scenario (sc2) [6] :
      - (sc2-a) use SQL*Plus to check the current database values, and note the current DEPT_WITH_OBJ_VERSION.OBJECT_VERSION values
      - (sc2-b) on adfc-config.xml run view1
      - (sc2-c) click the "Next" button (once), showing Deptno 20
      - (sc2-d) in another browser session open the same page (e.g. using http://127.0.0.1:7101/SignalRowInconsistent/faces/view1 )
      - (sc2-e) in the second browser session, click the "Next" button two times and the "Previous" button one time, showing Deptno 20
      - (sc2-f) still in the second browser session, make a change in the Loc field and click the "Commit" button
      - (sc2-g) use SQL*Plus to check the current database values, which show the DEPT_WITH_OBJ_VERSION.LOC column value change, but also the DEPT_WITH_OBJ_VERSION.OBJECT_VERSION value has changes on 3 records (all those were navigated to, but only one has really changed)
      - (sc2-h) in the first browser session, make a change in the Loc field and click the "Commit" button, which results in a "Error 500--Internal Server Error" with java.lang.NullPointerException in DCIteratorBinding.executeQueryIfNeeded()
      java.lang.NullPointerException
           at oracle.adf.model.binding.DCIteratorBinding.executeQueryIfNeeded(DCIteratorBinding.java:2160)
           at oracle.adf.model.binding.DCBindingContainer.internalRefreshControl(DCBindingContainer.java:3246)
           at oracle.adf.model.binding.DCBindingContainer.refresh(DCBindingContainer.java:2876)
           at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.prepareModel(PageLifecycleImpl.java:115)
           at oracle.adf.controller.faces.lifecycle.FacesPageLifecycle.prepareModel(FacesPageLifecycle.java:359)
      ...
           at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
      see also the screencast at http://screencast.com/t/MLLy8h8H

      To compare with Application Module Pooling enabled, a scenario very similar to scenario (sc2),
      scenario (sc3) :
      - (sc3-setup) check the "Enable Application Module Pooling" checkbox in the test.model.AppModule Application Module configuration
      - (sc3-a) use SQL*Plus to check the current database values, and note the current DEPT_WITH_OBJ_VERSION.OBJECT_VERSION values
      - (sc3-b) on adfc-config.xml run view1
      - (sc3-c) click the "Next" button (once), showing Deptno 20
      - (sc3-d) in another browser session open the same page (e.g. using http://127.0.0.1:7101/SignalRowInconsistent/faces/view1 )
      - (sc3-e) in the second browser session, click the "Next" button two times and the "Previous" button one time, showing Deptno 20
      - (sc3-f) still in the second browser session, make a change in the Loc field and click the "Commit" button
      - (sc3-g) use SQL*Plus to check the current database values, which show the DEPT_WITH_OBJ_VERSION.LOC column value change, but also the DEPT_WITH_OBJ_VERSION.OBJECT_VERSION value has changes on 3 records (all those were navigated to, but only one has really changed)
      - (sc3-h) in the first browser session, make a change in the Loc field and click the "Commit" button, which results in an Error dialog with the message "Another user has changed the row with primary key oracle.jbo.Key[10 ]"

      see also the screencast at http://screencast.com/t/6fGsf8pMJN7k

      questions : [7]
      - (q4) Is it intended behaviour to have updated version columns on rows that have not really been updated (as observed in step (sc2-g) and (sc3-g))?
      - (q5) How can the NullPointerException (in step (sc2-h)) be explained/avoided?
      - (q6) Why does the message in step (sc3-h) mention 'primary key oracle.jbo.Key[10 ]' while the row that really changed has Deptno 20?

      - [1] http://java.net/jira/browse/ADFEMG-62
      - [2] https://groups.google.com/d/topic/adf-methodology/aWYsT0SsMLw/discussion
      - [3] http://java.net/projects/smuenchadf/sources/samples/content/SignalRowModifiedByAnotherUserExceptionEvenWhenAMPoolingDisabled.zip
      - [4] https://blogs.oracle.com/smuenchadf/resource/examples#161
      (see als https://blogs.oracle.com/smuenchadf/entry/approach_to_ensure_conflict_detection )
      - [5] http://www.consideringred.com/files/oracle/2013/SignalRowModifiedByAnotherUserExceptionEvenWhenAMPoolingDisabled-v20130212.zip
      - [6] find scenario (sc1) in ADFEMG-62 [1]
      - [7] find questions (q1), (q2) and (q3) in ADFEMG-62 [1]

      many thanks
      Jan Vervecken
        • 1. Re: Signal Row Modified By Another User Exception Even When AMPooling Disabled
          Stephen J.
          Jan,
          thanks for all the detail you've provided on this issue, here and in the EMG resources. I've experienced the same or similar issues in several places.

          To (partially) answer (q6) - when you commit in (sc3-h) it is trying to update the OBJECT_VERSION field on all 3 records, just as it did in (sc3-g). Since key 10 comes first in the row set, it gets checked for currency first and hits the error first. The big question is (q4), why are the change indicators getting updated on records that you DID NOT CHANGE?

          I have seen this happen in and editable table view, where only one of 500 records is updated, but the change indicator on all 500 records gets changed. It's very disturbing.
          • 2. Re: Signal Row Modified By Another User Exception Even When AMPooling Disabled
            Jan Vervecken
            Thanks for your reply Stephen J.
            Stephen J. wrote:
            ... I've experienced the same or similar issues in several places. ...
            Thanks for the confirmation.
            ... To (partially) answer (q6) ... key 10 comes first ... The big question is (q4) ...
            Indeed there seems to be a relation between (q6) and (q4).
            ... I have seen this happen in and editable table view ...
            Thanks for mentioning this, but it seems complicated as it is, so I would prefer to focus on the "update a single row scenario's" here first.

            regards
            Jan
            • 3. Re: Signal Row Modified By Another User Exception Even When AMPooling Disabled
              Jan Vervecken
              fyi

              Some feedback in SR 3-6322025251 ...

              "
              After some on-going discussions with Product Managers, they don't believe this is expected behavior in the 3 questions (q4), (q5) and (q6).

              I have so created 3 new bugs for Development evaluation as no answer or known issue found.
              I have created a spin-off SR for each question/bug as per our policy we handle only one issue/bug per SR.

              You can follow each question/bug progress in the following SRs :

              - (q4) Is it intended behavior to have updated version columns on rows that have not really been updated (as observed in step (sc2-g) and (sc3-g))?
              SR 3-6838483321: Entity attribute with change Indicator and version history gets updated even if row unmodified in UI
              Bug 16381918 - OBJECT VERSION ATTRIBUTE INCREMENTED EVEN IF ROW UNMODIFIED IN UI

              - (q5) How can the NullPointerException (in step (sc2-h)) be explained/avoided?
              SR 3-6838483348: NPE in oracle.adf.model.binding.DCIteratorBinding.executeQueryIfNeeded
              Bug 16382070 - NPE IN ORACLE.ADF.MODEL.BINDING.DCITERATORBINDING.EXECUTEQUERYIFNEEDED

              - (q6) Why does the message in step (sc3-h) mention 'primary key oracle.jbo.Key[10 ]' while the row that really changed has Deptno 20?
              SR 3-6838483413: Incorrect primary key value from oracle.jbo.RowInconsistentException
              Bug 16382246 - INCORRECT PRIMARY KEY VALUE FROM ORACLE.JBO.ROWINCONSISTENTEXCEPTION

              Each bug has been published in MOS and are pending Development triage and evaluation.
              "

              On My Oracle Support, I have been able to find bug 16381918, bug 16382070 and bug 16382246.

              regards
              Jan
              • 4. Re: Signal Row Modified By Another User Exception Even When AMPooling Disabled
                Jan Vervecken
                fyi

                Today's feedback in SRs 3-6838483321, 3-6838483348 and 3-6838483413 pointed out these bug status changes:

                - bug 16381918, "OBJECT VERSION ATTRIBUTE INCREMENTED EVEN IF ROW UNMODIFIED IN UI"
                currently has "Status 11 - Code/Hardware Bug (Response/Resolution)"

                - bug 16382070, "NPE IN ORACLE.ADF.MODEL.BINDING.DCITERATORBINDING.EXECUTEQUERYIFNEEDED"
                currently has "Status 11 - Code/Hardware Bug (Response/Resolution)"

                - bug 16382246, "INCORRECT PRIMARY KEY VALUE FROM ORACLE.JBO.ROWINCONSISTENTEXCEPTION"
                currently has "Status 11 - Code/Hardware Bug (Response/Resolution)"

                But, none of those have published comments on the recent status change.

                regards
                Jan
                • 5. Re: Signal Row Modified By Another User Exception Even When AMPooling Disabled
                  Jan Vervecken
                  fyi

                  Today I got some feedback in service request 3-6838483321:

                  - bug 16381918 got updated and currently has "Status 32 - Not a Bug. To Filer "

                  - Steve Muench's sample got updated
                  at https://blogs.oracle.com/smuenchadf/resource/examples#161
                  now "161.Signal RowInconsistentException Correctly Across Activation/Passivation [11.1.1.6] 12-MAR-2013 "
                  Because the ZIP file got updated on the same URL [1], my previous references could be confusing.

                  Steve Muench's sample (revision 51) now also includes navigation buttons, uses tr:inputHidden instead of h:inputHidden and has an updated explanation on the page:
                  "This page contains a hidden input component with the object version number using the tag tr:inputHidden. We use tr:inputHidden instead of h:inputHidden because tr:inputHidden supports Auto-PPR. This ensures that as the user navigates from row to row, that the hidden field is updated to reflect the latest value in the new current row via the Auto-PPR mechanism. "

                  Because these changes, for a scenario like (sc2), no longer update version columns on rows that have not really been updated, this illustrates the answer "no" on question (q4).

                  - [1] http://java.net/projects/smuenchadf/sources/samples/content/SignalRowModifiedByAnotherUserExceptionEvenWhenAMPoolingDisabled.zip
                  history
                  http://java.net/projects/smuenchadf/sources/samples/history?path=SignalRowModifiedByAnotherUserExceptionEvenWhenAMPoolingDisabled.zip
                  previous version
                  http://java.net/projects/smuenchadf/sources/samples/revision/5
                  http://java.net/projects/smuenchadf/sources/samples/content/SignalRowModifiedByAnotherUserExceptionEvenWhenAMPoolingDisabled.zip?rev=5
                  current version
                  http://java.net/projects/smuenchadf/sources/samples/revision/51
                  http://java.net/projects/smuenchadf/sources/samples/content/SignalRowModifiedByAnotherUserExceptionEvenWhenAMPoolingDisabled.zip?rev=51

                  regards
                  Jan
                  • 6. Re: Signal Row Modified By Another User Exception Even When AMPooling Disabled
                    Jan Vervecken
                    fyi

                    In both SR 3-6838483348 and SR 3-6838483413 I got this feedback:
                    "Please refer to the updated version of my example from my blog (updated 12-MAR-2013). Using <h:inputHidden> the value of the hidden field is not updated when navigating since the <h:inputHidden> does not support Auto-PPR. The latest version of the example workspace switches to use the <tr:inputHidden> instead which does support Auto-PPR which ensures the value in the hidden field always represents the object version from the current row when navigating. "
                    Which seems to include answers/feedback on questions (q5) and (q6).

                    regards
                    Jan
                    • 7. Re: Signal Row Modified By Another User Exception Even When AMPooling Disabled
                      Jan Vervecken
                      fyi

                      - bug 16381918 got updated and currently has "Status 92 - Closed, Not a Bug "
                      - bug 16382070 got updated and currently has "Status 92 - Closed, Not a Bug "
                      - bug 16382246 got updated and currently has "Status 92 - Closed, Not a Bug "

                      regards
                      Jan