Tuesday, 12 March 2019

Display "Select Action" menu on toolbar

In Maximo 7.6.1, system property is added to display "Select Action" menu on toolbar. Or else it will display on side bar.

System property name: mxe.webclient.showSelectActionInToolbar
Set to 1 to always show Select Action drowdown in the toolbar.

After Maximo upgrade toolbar actions are missing

When I upgrade to Maximo 7.6.1, toolbar options are not displayed.

Solution: Go to System Properties application --> search for "mxe.webclient.showOnToolbar"

Change global value to empty, I mean left it blank.


Save the property and do live refresh.

Monday, 4 March 2019

Enable/Disable MIF authentication


Disable MIF authentication:

In Maximo 7.6.1 --> System property --> mxe.int.allowdefaultlogin = 1
This property also overrides the ALLOWDFLTLOGIN settings in the ejb-jar.xml file for the default integration user.
source: https://www.ibm.com/support/knowledgecenter/en/SSLKT6_7.6.1/com.ibm.mam.doc/overview/c_new_mif_sys_prop_.html

Enable MIF authentication:

Maximo authentication is enabled by setting the mxe.useAppServerSecurity system property to 0 (false).
If maximo authentication is enabled, all HTTP-based inbound transactions must specify an HTTP header with the following attributes:
MAXAUTH
username:password (User credentials encoded to base64 format)

Note: I used this website to encode base64 https://www.base64encode.org/

Maximo Application Server authentication is enabled by setting mxe.useAppServerSecurity system property to 1 (true).

Take a backup of "ejb-jar.xml" from "maximo/applications/maximo/mboejb/ejbmodule/META-INF".
Modify "ejb-jar.xml" : ALLOWDFLTLOGIN as 1 (change 4 entries)
<env-entry>
<env-entry-name>ALLOWDFLTLOGIN</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>1</env-entry-value>
</env-entry>

The ALLOWDFLTLOGIN value must be set to 1 (true) for each of the following services in the XML file:
Enterprise Services
Object Structure Service
Standard Services
Workflow service

Note: The default integration user is not supported if you use the REST API or OSLC API. After you update the ejb-jar.xml deployment file, you must rebuild and redeploy the Maximo EAR file.

Source: https://www-01.ibm.com/support/docview.wss?uid=swg21965724 

Always try above steps in non production environments.


Friday, 8 February 2019

ORA-00959: Tablespace 'MAXIMO' does not exist

Error occurred while doing updatedb: Maximo 7.6.1 - Oracle 12c (12.2) - Websphere 9.0.0.7

ORA-00959: Tablespace 'MAXIMO' does not exist

After creating oracle database instance, we creates tablespaces MAXDATA, MAXTEMP and MAXINDEX.

Identify whether store partitions of the tables and indexes are correctly inserted in below tables:

SELECT DISTINCT STORAGEPARTITION FROM MAXTABLECFG;

if it returns MAXIMO, then run below query

UPDATE MAXTABLECFG SET STORAGEPARTITION = 'MAXDATA' WHERE STORAGEPARTITION = 'MAXIMO' ;

UPDATE MAXTABLE SET STORAGEPARTITION = 'MAXDATA' WHERE STORAGEPARTITION = 'MAXIMO' ;

COMMIT;

Now will verify in MAXSYSINDEXES

SELECT DISTINCT STORAGEPARTITION FROM MAXSYSINDEXES;

if it returns MAXIMO, then run below query

UPDATE MAXSYSINDEXES SET STORAGEPARTITION = 'MAXDATA' WHERE STORAGEPARTITION = 'MAXIMO' ;
COMMIT;

For me, above solution is worked. Please try in dev environment and analyse the solution, before you apply to production.

Tuesday, 22 January 2019

Kill Oracle session

Sorry guys, its been long time.

Error occured in Maximo 7.6.1 and Oracle 12c. This error occured while doing db config after adding index in WORKORDER table.

Error: ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired

Ran below query to find out the locked sessions:

select a.sid, a.serial#,b.object_id,b.oracle_username,b.os_user_name,c.object_name,c.owner from v$session a, v$locaked_bject b, dba_objets c where b.object_id = c.object_id and a.sid = b.session_id and object_name='<TABLE NAME>';

Once you get the output, note the sid and serial# values.

Run below query to kill the locaked session by login into sqlplus as user 'system'. If you know any user like 'sys' or 'maximo' having privileges to kill session, use them.

alter system kill session 'sid,session#'; -- Replace the sid and serial# values in the query.

Now verify DB config is stuck:

select * from maxvars where varname = 'CONFIGURING'; --Verify VARVALUE=0

If VARVALUE is 1, then change to 0.

update maxvars set varvalue = 0 where varname = 'CONFIGURING';

commit;

Sometimes it is required to restart the server. In my case, DB Configuration application was hung. so restarted the server. Once application is up, then recreated the index.

Thank you.


Thursday, 17 September 2015

MBO Date Formats

Sometimes we need to filter the MboSet records based on dates.
  • By using MXFormat.dateToSQLString(Date d) you can get the date format as "yyyy-MM-dd".

For example:
MboSetRemote mboSetRemote = getMboSet("ASSET");
mboSetRemote.setWhere(MXFormat.dateToSQLString(getDate("STATUSDATE")));

Here MXFormat.dateToSQLString will return date as string and format is '2015-09-17' (with single quotes).

  • If your database is using different date format, then update it in system properties mxe.db.format.date and use SQLFormat.getDateFunction(Date d)

For example:
MboSetRemote mboSetRemote = getMboSet("ASSET");
mboSetRemote.setWhere(SQLFormat.getDateFunction(getDate("STATUSDATE"));

Here SQLFormat.getDateFunction will return date as string in two ways:

1. If mxe.db.format.date is not null/blank then it will return string with given date format in this property.
for example: If mxe.db.format.date is dd-MM-yyyy, then return string will be '17-09-2015' (with single quotes)
2. If mxe.db.format.date is null/blank, then it will return same as MXFormat.dateToSQLString method, i.e. '2015-09-17' (with single quotes).

Hope it helps :)

Wednesday, 9 September 2015

BMXAA6002E - You cannot save object JOBPLAN : Job Plan=TESTJP1 Organization=ORG1 Site=SITE1 Revision=0 because of the data security restrictions. If you save the object, it becomes read-only and hidden

Error: BMXAA6002E - You cannot save object JOBPLAN : Job Plan=TESTJP1 Organization=ORG1 Site=SITE1 Revision=0 because of the data security restrictions. If you save the object, it becomes read-only and hidden

Environment: Maximo 7.6.0.1

Steps to reproduce above error:

1. Create a job plan and save it with DRAFT status.
2. Create a condition expression "status <> 'DRAFT'".
3. Create a global data restriction --> Object restriction --> Object JOBPLAN , app JOBPLAN , READONLY and add condition created in step 2.
4. Create a new user and associate a security group which has access job plan application (not maxadmin group).
5. Login with new user and go to job plans application.
6. Change status of job plan created in step 1 to ACTIVE and save the record.
7. Above error will occur.

Note: These steps will reproduce error in Maximo 7.6.0.1. In Maximo 7.1, job plans are editable even status is ACTIVE. So above steps will not reproduce errors in Maximo 7.1.

Cause: Out of box Job plan mbo is flagged to readonly when status is ACTIVE or INACTIVE. In our case, condition again trying to flag it readonly for the same mbo, hence this error occurs.

Solution: No need to put condition for Job plan to make it READONLY when status is ACTIVE or INACTIVE.

These are just my findings, if anyone have different approach, please provide your inputs in comments.

Display "Select Action" menu on toolbar

In Maximo 7.6.1, system property is added to display "Select Action" menu on toolbar. Or else it will display on side bar. Syst...