IBM Support

MAFPPDATAID column with NULL value

Troubleshooting


Problem

While using the Configuration Tool, the customers can face 2 issues related to the MAFAPPDATA table.

The MAFPPDATAID column has a NULL value instead of a sequential number.

This happens in the 8.7 and 8.8 version of Mobile.

Diagnosing The Problem

1) When trying to duplicate a Mobile Application, an error is displayed in the Configuration Tool:
Bad request: BMXAA4211E - Database error number -407 has occurred when operating on MAFAPPDATA : Application ID=XXXX

Looking at the SystemOut.log, the insert of the MAFAPPDATAID column is = null:
SystemOut     O 29 Jun 2022 23:13:52:079 [INFO]   [CID-MXOSLC-707] BMXAA6719I - app (OSLCMAFAPPDATA) object (MAFAPPDATA) : insert into mafappdata (revision,appmode,mafappdataid,deploydatetime,status,appid,buildtimestamp,ismobile,privatekey,deployby,checksum,version,app) values (?,?,?,?,?,?,?,?,?,?,?,?,?)
[29/06/22 23:13:52:080 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:080 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for REVISION = 0
[29/06/22 23:13:52:080 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:080 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for APPMODE = DEBUG
[29/06/22 23:13:52:081 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:081 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for MAFAPPDATAID = null
[29/06/22 23:13:52:081 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:081 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for DEPLOYDATETIME = 2022-06-29 23:13:10.177
[29/06/22 23:13:52:082 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:082 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for STATUS = ACTIVE
[29/06/22 23:13:52:082 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:082 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for APPID = TESTCOPY
[29/06/22 23:13:52:083 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:083 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for BUILDTIMESTAMP = 2022-06-29 23:13:10.177
[29/06/22 23:13:52:083 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:083 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for ISMOBILE = 0
[29/06/22 23:13:52:084 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:084 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for PRIVATEKEY = null
[29/06/22 23:13:52:084 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:084 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for DEPLOYBY = USERNAME
[29/06/22 23:13:52:084 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:084 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for CHECKSUM = 87f5023706a6df2dec0b9e6c362
[29/06/22 23:13:52:085 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:085 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for VERSION = 8.7.0.0
[29/06/22 23:13:52:085 BST] 0000020d SystemOut     O 29 Jun 2022 23:13:52:085 [INFO]   [CID-MXOSLC-707] BMXAA6721I - Bind value for APP = [@6bdbe1

This error is reported in the log:
SystemOut O 29 Jun 2022 23:13:52:211 [ERROR] [CID-MXOSLC-707] Assignment of a NULL value to a NOT NULL column "TBSPACEID=3, TABLEID=3518, COLNO=0" is not allowed.. SQLCODE=-407, SQLSTATE=23502, DRIVER=4.26.14 com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: Assignment of a NULL value to a NOT NULL column "TBSPACEID=3, TABLEID=3518, COLNO=0" is not allowed.. SQLCODE=-407, SQLSTATE=23502, DRIVER=4.26.14

Fixing the issue:
To fix this issue, you need to update the MAXATTRIBUTE, and MAXATTRIBUTECFG as follows for the MAFAPPDATAID field:
Defaultvalue = null
Autokeyname = nul
Canautonum = 0

SELECT DEFAULTVALUE, AUTOKEYNAME, CANAUTONUM, * from MAXATTRIBUTE where ATTRIBUTENAME = 'MAFAPPDATAID' and OBJECTNAME = 'MAFAPPDATA'
--UPDATE MAXATTRIBUTE SET DEFAULTVALUE = NULL, AUTOKEYNAME = NULL, CANAUTONUM = 0 where ATTRIBUTENAME = 'MAFAPPDATAID' and OBJECTNAME = 'MAFAPPDATA'

SELECT DEFAULTVALUE, AUTOKEYNAME, CANAUTONUM, * from MAXATTRIBUTECFG where ATTRIBUTENAME = 'MAFAPPDATAID' and OBJECTNAME = 'MAFAPPDATA'
--UPDATE MAXATTRIBUTECFG SET DEFAULTVALUE = NULL, AUTOKEYNAME = NULL, CANAUTONUM = 0 where ATTRIBUTENAME = 'MAFAPPDATAID' and OBJECTNAME = 'MAFAPPDATA'

After that, restart your Maximo server to reflect the changes, and try to duplicate the app again.

-

2) You can’t see your changes after publishing an app.
After a change is made in the app.xml and you try to publish an app, it gets put in the MAFAPPDATA table in Maximo, however the column MAFPPDATAID of the table is not populated.

So, when you try to download the new app on your Mobile device, the app downloads an old version of the app that has the MAFPPDATAID properly populated (without your changes)

Fixing the issue:
The workaround, to use the app with your latest changes that you just published, is manually updated the MAFPPDATAID column to the next valid sequence number:

Check whether you have any app with NULL in the MAFAPPDATAID column:
SELECT APPID, STATUS, REVISION, MAFAPPDATAID FROM MAFAPPDATA
WHERE MAFAPPDATAID = NULL

If so, check the last MAFAPPDATAID value to keep the sequence.
SELECT MAX (MAFAPPDATAID) FROM MAFAPPDATA

If the last value of the MAFAPPDATAID column is 10, you need to update the value of the NULL MAFAPPDATAID to 11. If the value is 50, update to 51.

UPDATE MAFAPPDATA SET MAFAPPDATAID = '51' WHERE MAFAPPDATAID = NULL

Resolving The Problem

The fix to prevent that is the same for both problems, update the MAXATTRIBUTE and MAXATTRIBUTECFG for the MAFAPPDATAID field.

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB59","label":"Sustainability Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSRHPA","label":"IBM Maximo Application Suite"},"ARM Category":[{"code":"a8m3p000000hAgaAAE","label":"Maximo Application Suite-\u003EMAS Applications-\u003EMobile"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.7.0;8.8.0"}]

Product Synonym

Maximo Mobile for EAM; Maximo Mobile

Document Information

Modified date:
26 October 2022

UID

ibm16832090