cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
Read only

Uncaught ReferenceError: sap is not defined

allie_adjiet2
Explorer
0 Likes
13,318

Hi All,

I tried to implement walktrhu code: Bullet - Vertical  via Eclipse juno, deployed locally via tomcat server. I am getting  error below. help please. error persist even when using CDN.

View Entire Topic
pinakipatra
Contributor

Hi ,
Try using the below code for bootstraping

Reposiotory call :

<script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js"

                id="sap-ui-bootstrap"

                data-sap-ui-xx-bindingSyntax="complex"

                data-sap-ui-libs="sap.m"

                data-sap-ui-theme="sap_bluecrystal">

        </script>

To call eclipse resources call

script src="resources/sap-ui-core.js"

allie_adjiet2
Explorer
0 Likes

Hi Pinaki,

Thanks for response. tried the initially,  CDN was my 2nd option.

Regards,

Allie

vfweiss
Participant
0 Likes

Hello Allie

The problem with your CDN link is the version number in it.

(https://openui5.hana.ondemand.com/1.2.8/resources/sap-ui-core.js vs https://openui5.hana.ondemand.com/1.28.8/resources/sap-ui-core.js

In the log you see an error on the GET of the JS file.

Oh and you might want to get the SAPUI5 variant if you use the viz library, it is not in the openui5 set.

So either the link provided by Pinaki or if you really wish to use version 1.28.x:

https://sapui5.hana.ondemand.com/1.28.8/resources/sap-ui-core.js

Regards,

Vincent

allie_adjiet2
Explorer
0 Likes

Thanks Vincent,

thanks for pointing out, i have corrected, but did run  2 previous runs with https://sapui5.hana.ondemand.com/1.28.8/resources/sap-ui-core.js and

src="resources/sap-ui-core.js"  with no success.

allie_adjiet2
Explorer
0 Likes

Hi Guys,

I found the problem, I had a problem in my Javascript Include Path. Correct and all is fine. Thank you for your assistance.

agentry_src
Active Contributor

Please mark this Discussion with a Correct Answer (closes, but does not lock the Discussion) and Helpful Answer where appropriate. See http://scn.sap.com/community/support/blog/2013/04/03/how-to-close-a-discussion-and-why   Even if you discovered the solution without any outside contributions, it helps others to understand what the solution turned out to be. 

Do not use Assumed Answered as it confuses anyone looking for the specific answer.  If you dig into the Getting Started link (top right of each SCN page), you are only instructed to mark Helpful or Correct Answers to Discussion responses. 

Thanks, Mike (Moderator)

SAP Technology RIG