8 Replies Latest reply: Oct 5, 2012 8:32 AM by 965994 RSS

    Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?

    560577
      All,

      Anyone run into this with a solution yet?

      We recently upgraded from 4.1.0.-something to 4.1.1.00.23 and all of my existing tabular forms (that is, any created prior to the upgrade) are all having issues if they have popup LOVs and a tabular form validation fails.

      Seems to be:

      1. Tabular form with at least one popup LOV (regular popup LOV or popup Key LOV both seem to be a problem).
      2. Validation that fails the user on a new row after submit.
      3. Error that happens:
      report error:
      ORA-01403: no data found
      ORA-06510: PL/SQL: unhandled user-defined exception

      Can't seem to duplicate on apex.oracle.com yet. Tried to but any page I create there is newly-created and not "upgraded" from an existing page.

      The only thing I can find out so far is that if I switch my two LOVs to select-lists, I don't get the error when validation fails. However my LOVs are large enough that I can't use select-lists.

      For example in my case:
      1. Tabular form with existing data.
      2. Add new row.
      3. On the new row, I have these fields:
      part number (required, no default value)
      parent part number (required, has a default value)
      quantity per assembly (optional, no default)
      comments (optional)
      4. On the new row I enter a quantity per assembly.
      5. I hit Submit even though part number is null.
      6. A tabular form validation to check that part number is not null correctly fires.
      7. Page repaints with the correct validation error message
      8. But at the bottom of my page is the ugly error, my unsaved new row does not show.
      9. Also the report pagination doesn't display but that could be just because the ugly error coincides with all processing and rendering stopping.

      Also if I hit "add row" again, I get a new error (again, might be a side effect of first problem) this time from javascript:
      Message: 'gTabFormReportID' is undefined
      Line: 18
      Char: 89665
      Code: 0
      URI: http://pwyhttvso01.rb.uav.com:7777/i4/javascript/apex_4_1.min.js

      Anyone else run across this?
        • 1. Re: Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?
          560577
          A co-worker just found he has the same problem. But his tabular form is manually-built (mine is wizard-built), his is also "converted" (existed prior to 4.1.1.00.23) and he runs across the error on updating existing rows too. I just checked my page and yes it will also give the same error if I update an existing row with invalid data.
          • 2. Re: Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?
            560577
            Found it.

            Developer error although the way Apex is erroring is not representive of the problem and is highly misleading.

            In my popup key LOVs I have a javascript onchange event declared. If you don't have enclosing double-quotes around it, it causes this error.

            So...

            Wrong:
            onchange=$s('P263_RELOAD','Y');

            Right:
            onchange="$s('P263_RELOAD','Y');"

            Go figure. (sigh...)
            • 3. Re: Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?
              Patrick Wolf-Oracle
              Hi,

              yes that's really hard to figure out! What I always do is to use Firebug in FF if I have such issues. The nice thing is that it immediately shows in it's icon that JS errors have occurred while rendering that page. That helps to narrow it down.

              BTW, did you say this worked in 4.1 but not in 4.1.1.00.23? Because I would assume this is a browser HTML parsing error and not something where APEX is involved and where we could have changed something in the patch set.

              Regards
              Patrick
              -----------
              My Blog: http://www.inside-oracle-apex.com
              APEX Plug-Ins: http://apex.oracle.com/plugins
              Twitter: http://www.twitter.com/patrickwolf
              • 4. Re: Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?
                560577
                Patrick Wolf wrote:
                Hi,

                yes that's really hard to figure out! What I always do is to use Firebug in FF if I have such issues. The nice thing is that it immediately shows in it's icon that JS errors have occurred while rendering that page. That helps to narrow it down.

                BTW, did you say this worked in 4.1 but not in 4.1.1.00.23? Because I would assume this is a browser HTML parsing error and not something where APEX is involved and where we could have changed something in the patch set.

                Regards
                Patrick
                -----------
                My Blog: http://www.inside-oracle-apex.com
                APEX Plug-Ins: http://apex.oracle.com/plugins
                Twitter: http://www.twitter.com/patrickwolf
                I actually was not getting a Javascript error though at all and the Javascript itself does fire properly at runtime and the error that is showing is a PL/SQL error that somehow would hint that the problems have to be starting somewhere in the Apex, app server, or database realms, no?

                As far as 4.1 vs 4.1.1.00.23, I don't believe it happened in 4.1 but really because popup Key LOVs in 4.1 didn't support the definition of anything in the HTML Element Attributes (it was ignored at runtime if you put anything in there). Bug#12941780 was corrected for this in 4.1.1.00.23 and it looks like while it was implemented to support rendering the HTML Element attributes at runtime for popup key LOVs, this new bug looks like it came along with it. As soon as I saw that this functionality was available, I changed a few of my pages to use it, but entry of Javascript there on popup Key LOVs without the enclosing double quotes, while seemingly valid from a Javascript point of view (although perhaps not best practice on my part), is causing some rendering problem.

                IIRC in 4.1 that on a popup LOV (not the "key" kind) that this was supported (rendered the HTML Element attributes at runtime) and I don't recall seeing this issue with those.

                The Javascript error when hitting "add row" after the initial PL/SQL error I suspect is just some collateral damage created by the improper page rendering circulating around the first PL/SQL "no data found" error.
                • 5. Re: Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?
                  560577
                  FYI...my ticket with Oracle on this has been addressed and Oracle has entered bug# 14085739 for this.
                  • 6. Re: Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?
                    Greg Jarmiolowski
                    I have a similar issue. I have the same version and recently added a validation to one of my tabular forms. Now when the validation fails I get this error. In my case I have one regular select list in the form and it appears to execute the select list getter query for each row and then for the dummy extra row and that is when it fails.

                    For example this page view shows 4 rows. Here is the debug output.

                    0.25832     0.00096     print column headings     4     3
                    0.25929     0.00224     rows loop: 20 row(s)      4     8
                    0.26152     0.00435     ...Execute Statement: begin begin select question_type, question_type_id bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value from survey_question_type where enabled_yn = 'Y'; end; end;     4     15
                    0.26587     0.00416     ...Execute Statement: begin begin select question_type, question_type_id bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value from survey_question_type where enabled_yn = 'Y'; end; end;     4     14
                    0.27003     0.00418     ...Execute Statement: begin begin select question_type, question_type_id bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value from survey_question_type where enabled_yn = 'Y'; end; end;     4     14
                    0.27421     0.00413     ...Execute Statement: begin begin select question_type, question_type_id bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value from survey_question_type where enabled_yn = 'Y'; end; end;     4     14
                    0.27834     0.00414     ...Execute Statement: begin begin select question_type, question_type_id bulk collect into wwv_flow_utilities.g_display,wwv_flow_utilities.g_value from survey_question_type where enabled_yn = 'Y'; end; end;     4     14
                    0.28249     0.00073     report error: ORA-01403: no data found ORA-06510: PL/SQL: unhandled user-defined exception

                    If I turn off the validation or the validation passes I don't get an error.

                    Additionally the page with the error cannot be re-posted. If I try to correct what the validation failed on and resubmit I get a "404 Not Found" message.

                    I don't have the javascript issue (there is a dynamic action but it is triggered by a jquery selector) and I removed both the default value and the element attributes and the error is still appearing.

                    Greg

                    Edited by: Greg Jarmiolowski on Jun 8, 2012 8:21 PM
                    • 7. Re: Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?
                      965994
                      Using APEX 4.1.1.00.23 and app is new, from scratch - it was not upgraded from previous version.
                      Page has three manual tabular forms, each from a different collection, plus a form region using the automatic DML processing.

                      The last tabular form region on the page has a Select List (Named LOV) column. The other regions also have LOVs. Rows are added to the tabular form(s) by adding members to their respective collections and submitting
                      the page without validations to cause page refresh.

                      If a row is added to a region (not necessarily the last region) and the page is submitted with validation errors, I get the following error text embedded directly in the page below the last region:
                      report error:
                      ORA-01403: no data found
                      ORA-06510: PL/SQL: unhandled user-defined exception

                      Not good. If no rows added to the regions, everything works as expected.
                      If there are NO validation errors, OR if the last column is changed from an LOV to a plain text field, then no problem - everything works!

                      In the debug log, the error is being generated when the last column's LOV value is being rendered FOR A ROW THAT DOES NOT EXIST!?! The LOV script is being run an extra time. If there is one row, then it runs the LOV script twice.
                      • 8. Re: Error and bug in 4.1.1.00.23 with existing tabular forms with popup LOVs?
                        965994
                        I believe Greg and I are experiencing same problem.
                        In Greg's example, four rows of data generated five execute SQL statements - an extra evaluation for a non-existent row!

                        In my case, apparently this was for the header row.
                        The APEX engine upon partial page refresh must be expecting a header row in addition to all the data rows.
                        But the report template I was using did not creating a header row as I had no column headers on the report.
                        I confirmed the HTML table layout, by inspecting the page source, that only <TR> tags for data rows existed.

                        I changed the report template to one that created an empty header row, and problem solved!