4 Replies Latest reply: Dec 21, 2011 3:59 PM by 728847 RSS

    ERR-7620 - Could not determine workspace for application

      Hi All,

      "Anychart" using AJAX callback fails with *"sqlerrm:ORA-20876: Stop APEX Engine"* Error. When I click on this error in my firebug tool, I get the below error.

      Error-720 Could not Determine the workspace for the application.

      Our applications (which has Anycharts) work fine in 3.2, but when migrated to 4.1 throws the above error. I'm using Ajax call back to build the xml.
      After so many retries, and help with firebug, I was able to identify the source of the problem, it was the last line of the AJAX callback code which was the source for the error.

           htmldb_application.g_unrecoverable_error := true;

      Here's the AJAX code:
      l_total NUMBER ;
      l_filer varchar2(200);
           OWA_UTIL.mime_header ('text/xml', FALSE);
           HTP.p ('<?xml version = "1.0" encoding="utf-8" standalone = "yes"?>');
              -- HTP.p ('<margin all="0"/>');
                     HTP.P('<animation enabled="True"/>');
                HTP.P('<chart plot_type="CategorizedVertical">');
                     HTP.P('<data_plot_settings default_series_type="Bar">');
                          HTP.P('<bar_series group_padding="0.3" shape_type="Cylinder">');
                               HTP.P('<tooltip_settings enabled="True">');
                                         HTP.P('<border color="DarkColor(%Color)"/>');
           HTP.P('{%SeriesName} ({%YValue}{numDecimals:0} GB)');
           HTP.P('{%YPercentOfCategory}{numDecimals:1}% Of Filer Storage');
                                         HTP.P('<bevel enabled="false"/>');
                          FOR cFILER IN (     SELECT * FROM     XYZ......                              
                          END LOOP;
                     --HTP.p ('<chart_background enabled="false"/>');
                          HTP.P('<title  position="top" align_by="Chart"  align ="Near" enabled="true"><font underline="true"/>');
                          HTP.P('<text> Filer - Total Capacity</text>');
                          HTP.P('<subtitle position="top" align_by="Chart" align ="Near" enabled="true">');
                               HTP.P('<background enabled="false"/>');
                               HTP.P('<text> ' || l_filer ||  ' (' ||  l_total || ' GB)</text>');
                          HTP.P('<legend enabled="true" position="Right" align="Spread" ignore_auto_item="true" padding="2" width = "80%">');
                               HTP.P('<format>{%Icon} {%SeriesName} ({%YValue}{numDecimals:2} GB)</format>');
                               HTP.P('<title enabled="true">');
                                    HTP.P('<text>Distribution of Storage</text>');
                               HTP.P('<columns_separator enabled="False"/>');
                                    HTP.P('<item source="Points"/>');
                                    HTP.P('<y_axis enabled="False">');
                                         HTP.P('<major_tickmarks enabled="False" />');
                                         HTP.P('<minor_tickmarks enabled="False" />');
                                         HTP.P('<scale mode="PercentStacked"/>');
                                HTP.P('<x_axis enabled="False">');
           htmldb_application.g_unrecoverable_error := true;
      If I comment out the last line in the Code the Chart seems to be working fine. Just wondering why this a problem in 4.1 and works well in 3.2 ??? Any ideas ??

      We have so many Applications using Anycharts (using AJAX call backs), so modifying "All" would be a lot of effort.

        • 1. Re: ERR-7620 - Could not determine workspace for application
          Instead of an AJAX process I created a "before Header" process in the page, and it works great !

          I have included
          htmldb_application.g_unrecoverable_error := true;
          If I comment out this line from the "before Header" process, I get an "XML parser error" .. Somehow the process behaves differently if using Ajax calls vs the page process.
          when Using AJAX to build it doesn't like the statement being included whereas in a "page process" it needs that statement to tell xml tag build was complete and forcefully shut the APEX engine.

          Can someone please help?

          • 3. Re: ERR-7620 - Could not determine workspace for application
            Patrick Wolf-Oracle
            Hi Chandu,

            I was able to reproduce your issue and have filed bug# 13524990 which we plan to fix in 4.1.1.

            About your question why does it work in a process of type "Before Header" and not in a "On Demand" process.

            *"Before Header" processes* are designed to be used as part of the page rendering. So multiple processes of this type or other types will fire during rendering of the page.
            With apex_application.stop_apex_engine; (the new supported and documented API) or apex_application.g_unrecoverable_error := true; (that's the old not documented way) it's possible to tell the APEX engine that it should stop after the current process and not continue the page rendering.

            *"On Demand" processes* are designed to be called with an AJAX call, and only the specified process will fire. So we didn't really expect that someone is using apex_application.g_unrecoverable_error in there because the process will stop anyway. We will fix that in 4.1.1.


            1) Remove the apex_application.g_unrecoverable_error from all your on-demand processes
            2) If there are too many, you could also export your application so that you get a text file and just replace htmldb_application.g_unrecoverable_error := true; with an empty string and then re-import the application again. That should be quicker if you really have a huge number of on-demand processes.

            My Blog: http://www.inside-oracle-apex.com
            APEX Plug-Ins: http://apex.oracle.com/plugins
            Twitter: http://www.twitter.com/patrickwolf
            • 4. Re: ERR-7620 - Could not determine workspace for application
              Thanks Patrick for your help. Will look into the workarounds you suggested and evaluate which one will work for us better.

              I was expecting the same behavior in 4.1 as in 3.2. Our On Demand processes (AJAX) use the *apex_application.g_unrecoverable_error := true;
              in the process definition. Also, I have seen there are a lot of posts on this forum to use this statement to explicitly stop the APEX engine rendering. It might be a different version from 4.1.

              Anyways, thanks for your time. Appreciated your help !!