Dear Experts,
My requirement is to use UI5 as the front-end technology of my ASP.NET MVC4 application. The development tools is Microsoft VS2013.
To make long story short, an error occurs in sap-ui-core.js. The error message says "0x800a138f - JavaScript runtime error: Unable to get property 'log' of undefined or null reference".
I write the following code.
In my Index.cshtml file.
@section SAPUI5 {<script type="text/javascript" id="sap-ui-bootstrap" data-sap-ui-language="en_US" src="@Url.Content("/resources/sap-ui-core.js")" data-sap-ui-theme="sap_bluecrystal" data-sap-ui-libs="sap.ui.commons, sap.ui.table"></script> }
In my _Layout.cshtml file
<!DOCTYPE html><html lang="en"> <head> <meta charset="utf-8" /> <title>@ViewBag.Title - My ASP.NET MVC Application</title> <link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" /> <meta name="viewport" content="width=device-width" /> @Styles.Render("~/Content/css") @Scripts.Render("~/bundles/jquery") @Scripts.Render("~/bundles/jqueryui") @RenderSection("SAPUI5", required: false) </head>
The statement "@RenderSection("SAPUI5", required: false)" at line 11 of _Layout.cshtml will execute the "@secction" part in index.cshtml.
However, I encounter the following exception. The error message is
Uncaught TypeError: Cannot read property 'log' of undefined
The exception happened at line 80, column 9729 of sap-ui-core.js. I copy the code in the following line.
jQuery.sap.log.info("Sync point '"+n+"' finished (tasks:"+T.length+", open:"+o+", failures:"+F+")")
In short, it seems that "jQuery.sap" is undefined.
I tried both "sap-ui-core.js" and "sap-ui-core-nojquery.js". The exception occurs in both of them.
Please give me advises to solve the problem. I have tried for 2 days and still unable to solve it.
Many thanks,
ps.
I use the following javascript libraries,
modernizr-2.6.2
jquery-1.8.2
jquery-ui-1.8.24