Thanks to @Liliana Malaescu post, you know how to verify whether issues with pre-loaded database generation are related to IMGLIB by temporarily excluding images from the pre-loaded database.
Please also check your MobileDBGeneration cron task history, if you hit the maximum size limit of a byte[] array, you will likely see an error similar to the following:
Required array length 2147483639 + 507 is too large
In this scenario I suggest, for production environments, consider using the MobileImgLibGeneration cron task while keeping the maximo.mobile.imglib.disableImagesFromLookup system property set to 0.
Setting maximo.mobile.imglib.disableImagesFromLookup to 1 has a side effect: when users log into the MAS Mobile application, the app will still attempt to download image libraries, which can increase loading time.
In my opinion a better approach is to keep images included in the pre-loaded database, but resize them beforehand. IBM provides the MobileImgLibGeneration cron task for this purpose.
Configuration steps:
1. Set MAS Manage system properties
maximo.mobile.imglib.disableImagesFromLookup = 0
maximo.mobile.imglib.resizeatserver = 1
maximo.mobile.imglib.resize.width = 400 (default value - adjust as needed)
maximo.mobile.imglib.resize.height = 400
2. Configure a new MobileImgLibGeneration cron task instance. Example parameters:
ThreadCount = 1
WhereClauseCond = IMGLIB.REFOBJECT in ('ASSET') AND IMGLIB.IMAGE IS NOT NULL
3. Run the MobileImgLibGeneration cron task. Monitor the results in the MOBILEIMGLIB table:
SELECT * FROM MOBILEIMGLIB;
You can also compare the original and resized image sizes:
SELECT
IMGLIB.IMGLIBID,
IMGLIB.REFOBJECT,
IMGLIB.IMAGENAME,
IMGLIB.MIMETYPE,
DATALENGTH(IMGLIB.IMAGE) AS IMGLIB_IMAGE_LENGTH,
DATALENGTH(MOBILEIMGLIB.IMAGE) AS MOBILEIMGLIB_IMAGE_LENGTH
FROM IMGLIB
LEFT JOIN MOBILEIMGLIB
ON IMGLIB.IMGLIBID = MOBILEIMGLIB.IMGLIBID;
4. Regenerate the mobile database - Once the image processing is complete, run the MobileDbGeneration cron task again and review the results.
------------------------------
Bartosz Marchewka
IBM Maximo Consultant
AFRY
------------------------------