Navigation:  Programming Cookbook > Deploying Applications >

What to do when things go wrong

Previous pageReturn to chapter overviewNext page

Image stripping is not an exact science. It is possible that the stripping process may remove too much from the image so that the resultant application does not execute correctly. This is why we have provided different stripping options that can be configured by the Lagoon Deployment Wizard. Unfortunately, since all the development tools are automatically stripped from a deployed image, tracking down the source of a problem can prove difficult. For example, a #doesNotUnderstand error at runtime simply brings up a message box with no opportunity to invoke the Debugger.

If you experience problems with your application that were not present in the development environment then you should experiment with one or more of the following procedures.

1.Re-deploy your application with all of the ImageStripper check box options turned off. If your application then works correctly try to isolate which of the options makes the difference by repeated attempts at re-deployment.
2.Turn on the Write log file option and re-deploy the application. This generates an XML log file manifest of all the classes and methods that are removed from the system together with a list of the classes remaining at the end of the stripping process. The log is sent to a file with the same name as that of the executable being generated but with a .XML suffix. You can use the Executable Browser to examine the contents on this file and this may allow you to isolate the problem.
3.It is possible to further control how the ImageStripper selects classes and methods to be removed:
All methods that belong to the category must not strip are forcibly preserved in the image. If you find that your application is failing because a particular method has been removed then try adding this to the must not strip category. This set of categories to maintain is determined by the ImageStripper>>requiredMethodCategories method.
Methods that belong to the categories must strip and examples are forcibly removed from the image. If you find, perhaps by browsing the executable manifest, that your application is too large and contains methods that could readily be removed then you can add them to the must strip category. The method ImageStripper>>notRequiredMethodCategories determines the set of method categories that are forcibly stripped.
A number of classes are always retained. These are determined in the ImageStripper>>requiredClasses method. Adding classes to this set may be able to alleviate the consequences of occasions when the stripper is "over aggressive" in its stripping policy.
You may specify that a number of classes are always removed. This set is determined by the ImageStripper>>notRequiredClasses method. Adding classes to this set may allow you to further reduce the size of deployed image.

If you wish to alter these default strategies then you may choose to create a new subclass of ImageStripper and override the appropriate methods. In this case, the Deployment Wizard gives you the opportunity to install the class of image stripper you wish to use.