IBM Worklight 6.1 - Uncaught ReferenceErrors: WLJQ is not defined, WL is not defined

倖福魔咒の 提交于 2019-12-06 00:08:42
sma

@DavidDhuyveter has a good answer in the comments. I had this problem on a Mac and on a Windows PC. His answer fixed my Mac issues.

For Windows, the temp folder should be in /Users/you/AppData/Local/Temp/1/ or something along those lines.

EDIT David comments were deleted. This is the original:

If you are on a mac, do the following: Exit eclipse. Open a terminal window and cd $TMPDIR, rm -rf wlBuildResources wlPreview, Restart Eclipse, rebuild your app and you should be good to go –

This problem actually happens a lot and it is actually really frustrating. Sometimes everything will be working for awhile and out of nowhere, this lovely error pops up. Something you can do instead (which has worked for me consistently) is:

  1. In Eclipse, go to Project -> Clean ...
  2. Select clean selected project checkbox, and select your Project
  3. Hit ok

I would try that first and see what it does. If not, you can do the trusted method of removing and re-importing.

This problem still occurs in v7.0.

While the cleaning of the TMPDIR works some times, it does not always do so - I can see no pattern here.

Rebooting my MACbook seems to work reliably, I speculate that this is because we get a new TMPDIR.

I just discovered that:

  1. Remove project from server
  2. Rename project (eg MyProjectZZZ)
  3. Rebuild and deploy, but don't bother to run
  4. Rename project back to MyProject
  5. Rebuild and deploy

Seems to clean things up

What helps me each time when I run into this problem while opening the app from the Worklight console is that I right-click on the app, choose Run As -> Preview before I attempt to load it from the Worklight console. After that, app starts working no matter from where I launch it.

same problem with WL 6.1.My app did not work with the link "preview as common ressources", but it worked with the mobile browser simulator

I Solved it by exiting eclipse then deleted wlbuildressources and wlpreview folder in tmp folder (/tmp on linux). After that, I restarted eclipse and it worked. However, it is a bug in 6.1.

I think I finally figured out an easy workaround for this one.

Right click on your project name in Eclipse, choose Close Project and then right-click again and choose Open Project. This fixed my broken preview pages.

The quickest workaround for me is to remove the project and then add the project into the workspace again. This need not suffer from renaming the project or other process.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!