IBM Worklight 6.0 - How to resolve 404 errors for

2019-09-03 08:37发布

问题:

I'm trying to update a worklight application to use the dojolib created by WL6 instead of a baked-in version of dojo supplied by the project. I've udpated the build-dojo.xml file to copy files from the dojoLib instead of an older version, and I've been able to resolve the additional dependency issues from the updated version. I'm still seeing a few 404 errors associated with some javascript map files. I tried to copy the map files from the older version of dojo, but no luck in resolving this 404. Curious if this is a defect or if there is an easy workaround.

Here's the error in the chrome dev console:

GET http://localhost:10080/BPMWorklight/apps/services/preview/BPMApp/iphone/1.0/default/dojo/core-web-layer.js.map 404 (Not Found) :10080/BPMWorklight/apps/services/preview/BPMApp/iphone/1.0/default/dojo/core-web-layer.js.map:1

GET http://localhost:10080/BPMWorklight/apps/services/preview/BPMApp/iphone/1.0/default/dojo/mobile-ui-layer.js.map 404 (Not Found) :10080/BPMWorklight/apps/services/preview/BPMApp/iphone/1.0/default/dojo/mobile-ui-layer.js.map:1

回答1:

In the short - you can ignore that messages.

If you really want to remove it - there is two options:

  1. Make them work. Actually, for this you need to ensure that you can actually load this files. If you have 404 - it means you haven't them there, you have put them to wrong place, wrong name, server is misconfigured, etc. First of all - you need map files from the same version of dojo (in other case they are meaningless), and the second - you need to find out why you cant load them. They should be accessible as a regular files - no tricks.

  2. Remove the reference to map files from dojo library. In that case you need to get over all the js and find and remove string like '//@ sourceMappingURL=...'