4

I'm using IBM MobileFirst 7.0 installed in Eclipse Luna.
I have 2 apps: mobile app and console app in the same project.

Whenever I will run the console app I will get the following error message:

Uncaught ReferenceError: WLJQ is not defined initOptions.js:47 Uncaught ReferenceError: WL is not defined

And on running the iPad application I get:

File or directory not found and Server Error

Log:

App[3991:1914543] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:324 :: Request Failed
App[3991:1914543] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:325 :: Response Status Code : 404
App[3991:1914543] [DEBUG] [WL_AFHTTPCLIENTWRAPPER_PACKAGE] -[WLAFHTTPClientWrapper requestFailed:error:] in WLAFHTTPClientWrapper.m:326 :: Response Error : Expected status code in (200-299), got 404
App[3991:1914543] [ERROR] [WL_REQUEST] -[WLRequest requestFailed:error:] in WLRequest.m:466 :: Status code='404' error='Expected status code in (200-299), got 404' response='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>
<style type="text/css">
<!--

body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;} 
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;} 
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} 
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->

</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>404 - File or directory not found.</h2>
  <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
 </fieldset></div>
</div>
</body>
</html>

If I re-import my project to a new Eclipse workspace this error stops appearing, but after I quit Eclipse and re-open it the problem reappears.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
Vishal Singh
  • 628
  • 1
  • 7
  • 25
  • Close Eclipse, open terminal and use "open $TMPDIR", delete the wlBuildResources folder. Try again. – Idan Adar Apr 17 '15 at 07:07
  • Okay, lets take a step back - what's "mobile app and console app"? Do you mean two apps? How do these two apps interact? Can you zip your workspace and your eclipse and upload them somewhere so I'll use it locally here? – Idan Adar Apr 17 '15 at 07:25
  • We have two apps. one that runs on iPas and other is for admin that runs on console.For both we are using sql adapter through which we are handling the data. Code is company property so I cannot share like this. I made one demo app but in that I am not facing this problem. In this project only I am facing the same – Vishal Singh Apr 17 '15 at 07:38
  • I do see this problem intermittently in 6.3, cannot define what triggers it. I know some folks find the $TMPDIR fix works, but for me the only workaround is to exit Eclipse and completely reboot my machine or create a new project. – djna Apr 17 '15 at 08:22
  • One workaround that generally works for me is changing workspaces and importing the project into a new workspace. – Chevy Hungerford Apr 17 '15 at 14:12
  • @VishalSingh, is this also reproduced for you with a Blank new app? (create project, use it, close eclipse, re-open eclipse) – Idan Adar Apr 19 '15 at 17:49
  • @IdanAdar, Is there any fix pack related to this issue for development Environment in IBM Mobile First 7.0. – Vishal Singh Apr 20 '15 at 09:13
  • No. There isn't. Please see my previous comment. – Idan Adar Apr 20 '15 at 09:23
  • Sorry,I missed Your last comment.I made one demo app and first time application was working fine, But when i closed my original project and ran, again i got the same error. – Vishal Singh Apr 20 '15 at 10:26
  • What are you doing with the application after you create it? Exact steps. – Idan Adar Apr 20 '15 at 16:48
  • I just ran my application "Run as MobileFirst development server" and opened it in browser. – Vishal Singh Apr 21 '15 at 06:50
  • Really need something tangible that you re able to supply us with in order to re-create it. Take your project remove anything confidential in it, then upload it somewhere so we could debug it. That's the only way going forward here. – Idan Adar Apr 22 '15 at 04:38
  • This is the demo project that I have created and ran in development environment, and I am getting same error as my existing project. https://www.dropbox.com/s/xz6jzzme0ixenui/Demo.zip?dl=0. – Vishal Singh Apr 27 '15 at 05:47
  • I am unable to reproduce the error with this sample... – Idan Adar Apr 28 '15 at 09:07
  • @VishalSingh, Is this still happening? Are you able to provide a project with two apps that trigger this? – Idan Adar May 16 '15 at 13:26
  • This issue got fixed without doing anything.On every start I was changing the Eclipse workspace but now it is not giving me error. – Vishal Singh May 25 '15 at 09:12
  • @VishalSingh, Are you then willing to remove this question? – Idan Adar Jun 05 '15 at 12:39
  • @VishalSingh - If you face it next time, delete the generated folders, clean the project and run the build again. – Sachin Thapa Mar 15 '16 at 14:48

2 Answers2

6

One thing I have come to find, and that will hopefully work here as well, is the following.

If this happens after you change networks, or your IP address changes, attempt (try it regardless) to right-click on the application folder and select Run As > Preview. This will force and IP update on the server, and at least here - solves this issue.

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
1

Removing the temp folders worked for me. Follow these steps

  1. Close Eclipse.
  2. Open the terminal and use open $TMPDIR command.
  3. Navigate to the sub folders. Find and delete the wlBuildResources folder
  4. Open eclipse and rerun the application.
ChandrasekarG
  • 1,384
  • 13
  • 24