Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
8 replies Latest Post - ‏2013-01-23T06:36:45Z by SystemAdmin
SystemAdmin
SystemAdmin
2327 Posts
ACCEPTED ANSWER

Pinned topic IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

‏2013-01-21T08:49:05Z |
I have recently started exploring IBM Worklight which looks really promising to build hybrid mobile apps, in order to do so, created a Worklight project while choosing Dojo Toolkit as a default framework choice and got to see the missing dojo/main.js issue.

Here is the HTML code:

<!DOCTYPE HTML>
<html>
<head>
<title>TD_Mobile</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">

<script src="dojo/dojo.js" data-dojo-config="isDebug: false, parseOnLoad: true, async: false"></script>

<link rel="stylesheet" href="css/TD_Mobile.css">
</head>
<body id="content" style="display: none;">

TD_Mobile
<!--application UI goes here-->
<script src="js/initOptions.js"></script>
<script src="js/TD_Mobile.js"></script>
<script src="js/messages.js"></script>
</body>
</html>

When I do build and deploy and run the project from worklight console as a common resource, got to see the main.js not found issue at the following path http://localhost:8080/apps/services/preview/TD_Mobile/common/1.0/default/dojo/main.js

And to my surprise further, I was able to search the reference folder at C:\Users\marif\workspace\WorklightServerHome\TD Mobile New\widget-resources\TD_Mobile-common-e6cd3d9088c88e96df743ed1c9a1b584a90da8c9\preview\default\dojo and don't see main.js and some more JS files there.

Looks like final deployed build somehow not working properly, would appreciate for any quick pointer.
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

    ‏2013-01-21T09:09:57Z  in response to SystemAdmin
    By the way, I have been using Eclipse Juno along with Worklight Studio plugin version 5.0.5
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

    ‏2013-01-21T09:14:41Z  in response to SystemAdmin
    Hi,
    We have released (yesterday!) IBM Worklight 5.0.5.1; can you please upgrade your Developer Edition installation and try again with a new project? In my testing I do not see this error.

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

      ‏2013-01-21T09:17:11Z  in response to IdanAdar
      Thanks for the quick reply Idan, let me try to upgrade, would share findings in sometime.
      • SystemAdmin
        SystemAdmin
        2327 Posts
        ACCEPTED ANSWER

        Re: IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

        ‏2013-01-21T09:21:11Z  in response to SystemAdmin
        Idan, not able to find the direct link of Worklight 5.0.5.1, can you please share the url?
  • IdanAdar
    IdanAdar
    741 Posts
    ACCEPTED ANSWER

    Re: IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

    ‏2013-01-21T09:30:23Z  in response to SystemAdmin
    In Eclipse, choose Help >> Check for updates.
    If that doesn't work, choose Help >> Marketplace >> search for 'worklight' >> Install

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

      ‏2013-01-21T10:44:47Z  in response to IdanAdar
      I did upgrade but still no luck, here are the steps to reproduce it.

      Open up the main html file and make isDebug 'true' and async 'false', you would get the error as explain earlier.

      <script type="text/javascript"
      data-dojo-config="isDebug: true, async: false, parseOnLoad: true, mblHideAddressBar: false"
      src="dojo/dojo.js"></script>
      • SystemAdmin
        SystemAdmin
        2327 Posts
        ACCEPTED ANSWER

        Re: IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

        ‏2013-01-22T04:26:34Z  in response to SystemAdmin
        Kindly find the attached Worklight project.

        Just a note, haven't converted/imported any other project from outside, it's all fresh development in Worklight itself.

        Hope to see quick help around.
        • SystemAdmin
          SystemAdmin
          2327 Posts
          ACCEPTED ANSWER

          Re: IBM Worklight with Dojo Toolkit | Getting dojo/main.js 404 not found

          ‏2013-01-23T06:36:45Z  in response to SystemAdmin
          Any update?