Skip to Content

I am testing my Fiori extension project created based on SAP standard Fiori application “My Opportunity” and I meet with error message “Error: found in negative cache: ‘cus/crm/opportunityExt/Component.js’ from /sap/bc/ui5_ui5/sap/extcrm_opp/Component.js: Error: found in negative cache: ‘cus/crm/opportunity/Component.js’ from /sap/bc/ui5_ui5/ui2/ushell/resources/cus/crm/opportunity/Component.js: 404 – NOT FOUND” when I click tile of my Extension project in Fiori launchpad:

/wp-content/uploads/2015/06/clipboard1_716539.png

/wp-content/uploads/2015/06/clipboard2_716567.png

Issue analysis

put mouse onto the hyperlink part of the topmost callstack, “at a1…”, the mouse becomes a hand shape:

/wp-content/uploads/2015/06/clipboard3_716568.png

click it, and Chrome will bring us to the exact code where this error occurs. Click the bracket icon to format the code:

/wp-content/uploads/2015/06/clipboard4_716569.png

Now the reason of this “negative cache” is clear: there is a global array M which stores all currently loaded modules with their url and state. Since the module to be loaded when I click the tile of my extension project, “cus.crm.opportunity.Component.js”, has error state ( 5 ), the corresponding error is raised.

/wp-content/uploads/2015/06/clipboard5_716571.png

Why this Component.js file is needed when I click the tile

from the callstack we can find the answer:

1. UI controller has a method openApp, which will call render method.

/wp-content/uploads/2015/06/clipboard6_716572.png

2. render method will further delegate the call to load component via sap.ui.component.load:

/wp-content/uploads/2015/06/clipboard7_716573.png

What is negative cache

Let me copy the definition from wikipedia:

In computer programming, negative cache is a cache that also stores “negative” responses, i.e. failures. This means that a program remembers the result indicating a failure even after the cause has been corrected. Usually negative cache is a design choice, but it can also be a software bug.

I am glad today I know a new terminology 🙂

To report this post you need to login first.

14 Comments

You must be Logged on to comment or reply to a post.

  1. Maksim Rashchynski

    Running in debug mode gives you much more readable sources

    } else if ( oModule.state === FAILED ) {

      throw new Error(“found in negative cache: ‘” + sModuleName +  “‘ from ” + oModule.url + “: ” + oModule.error);

    (0) 
  2. Jared Commerford

    Im currently experiencing this issue with a few of my applications. Specifically Employee Lookup, My Time Events, My Services, My Team Calendar.

    Anyone know how to fix this?

    (0) 
    1. Naveenraj A

      Hi Jared, If you get Negative cache issue while opening a Tile in Launchpad, there may be a configuration problem in LPD_CUST entry or ICF node activation.

      As i understand from your application list(Standard apps), Please ensure that respective service nodes (in path- /sap/bc/ui5_ui5/sap/) are activated in ICF (tcode – SICF).

      Regards,

      Naveenraj

      (0) 
      1. Edwar Soto

        Thank you Naveenraj,

        I have resolved my issue with your commentary. !!!

        TX: SICF and just I have actived my service for fiori app. 🙂

        (0) 
    1. Jerry Wang Post author

      Hi Nithish,

      Can you please kindly paste the whole error message displayed in Chrome development tool – console tab here?

      Best regards,

      Jerry

      (0) 
      1. Nithish Puthiyaveedu

        Hi Jerry,

        I found the issue and its seems there is a bug in latest webide versions >1.14 while deploying extended apps to ABAP server.

        There is a new webapp additional folder created in BSP storage repository for the extended app which avoids loading up the component.js file through the launchpad. I corrected the UI5RepositoryPathMapping.xml file as below which identifies the component .js correctly

        <MappingEntry

            path              = webapp/Component.js

            is_folder         = “”

            internal_rep      = “B”

            internal_rep_path = “webapp/Component.js” />

        * —–correction——-

        <MappingEntry

            path              = “Component.js”

            is_folder         = “”

            internal_rep      = “B”

            internal_rep_path = “webapp/Component.js” />

        Regards,

        Nithish

        (0) 
        1. Jerry Wang Post author

          Hello Nithish,

          It is great that you have resolved the issue all by yourself, and really appreciated you have shared your solution to us!

          Best regards,

          Jerry

          (0) 
  3. Abhijit Zope

    We were facing this issue when we have enhanced TEAM CALENDAR application through Web IDE. Reason for issue was – service node in SICF was not activated (path: “/default_host/sap/bc/bsp/sap/” and path “/default_host/sap/bc/ui5_ui5/sap/” which we forgot to activate when moved object to production clients.

    Just adding my comments in case anyone facing same issue in this scenario and looking for solution.

    Regards,

    AZ

    (0) 
  4. Asim Mian

    My team is doing development in the Web IDE and was pushing code to ABAP repository. We were having the same issue and found that there is an optimized file created by Web IDE starting with UI5 (e.g. UI5B2B5D24238268DEF4FA05063EBE5142BBCACE17B). I directly edited the component.js which does not auto generate the above mentioned file. So it was still referencing the old snapshot.

    So I did the change back in Web IDE and pushed it over. That resolved this error for us.

    (0) 

Leave a Reply