Today, one of my friends came into my office. He was very hysterical because he could not create new instances in Process Portal after his upgrade from v22.214.171.124. to v8.5.7. This is a bad 'disease' as it is blocking my friend from developing applications. So immediate help was needed to keep the friendship !
In the logs I could see that a NullPointerException is occurring when trying to add the default theme CSS:
Caused by: java.lang.NullPointerException
The NullPointerException is occurring when to add the default theme CSS which in turn should relate to the Responsive Coaches Toolkit. My friend thinks, since the Responsive Coaches Toolkit is used for each new application in v8.5.7. the error should also occur when trying to create an application.
So at first, let’s take a look at the Responsive Coaches Toolkit .twx-file.
And there it is:
This is the defaultTheme which cannot be added. Great
But what can we do with that piece of information? Well, at least it confirms what BPM tries to do - adding the defaultTheme from Responsive Coaches Toolkit.
Ok, then let us check next if the Responsive Coaches Toolkit was or was not successfully established at the upgrade:
Checking the bootstrap and BPMConfig logs all looks fine and the Responsive Coaches Toolkit has been imported successfully.
My friend mentioned that he also encounters another issue:
The Out-Of-The-Box (OOTB) toolkits (e.g. System Data, Dashboard, etc, etc) dependencies of the toolkits remained on the Source BPM Level after the upgrade (v126.96.36.199) instead of using the correct version number (v8.5.7):
Both problems might have the same root cause and I knownow, how to proceed. We should check the tables for any issues on DB-level.
At first, let us check if there is any inconsistency related to the defaultTheme. The .twx-file shows the following ID number '72.e77f2a7e-10b4-45ee-90eb-e5b1546cc743'.
A short phone call with other Experts on this field and I got the information that the POType 72 stands for UIThemes
(unfortunately it is NOT shown in that web source http://bpmadmin.blogspot.com/2015/03/identificators-of-type-206425e13007.html)
Checking the table BPM_UITHEME, and I can see the default theme. In this case: E77F2A7E-10B4-45EE-90EB-E5B1546CC743
After some further DB-related analysis I can see a relation to the Main branch of the System Data Toolkit. However, all this looks fine. So what is causing the problem?
So I made the next investigation step. Since my friend also mentioned, that the toolkit dependencies of the toolkits remained on the Source BPM Level, we should check the LSW_SYSTEM table. This table contains information about the default snapshots for the OOTB toolkits.
This table shows the following:
LSW_SNAPSHOT and LSW_PROJECT show that '8169b406-0a60-49e2-a0d5-83517c51ec81' is the snapshot v188.8.131.52. of project System Data Toolkit. Dr. Debug saw the same issue for other OOTB toolkits.
To sum up what I can see:
The default snapshots for the OOTB toolkits (see LSW_SYSTEM) are still set to the old (source) snapshots v184.108.40.206.. These snapshot are then chosen when new process apps are created. The Nullpointer at addDefaultTheme is only a symptom which is caused because wrong snapshots are used as basis (on which Responsive Coaches Toolkit even did not exist).
Great finding, but how what can this be caused. I found a resource to answer that question:
It seems that the current implementation relies on the ORIG_CREATED_ON date value for the toolkit's snapshot. In this case, after the upgrade both 8502 and 8570 snapshots exist in LSW_SNAPSHOT table. There were cases in the past were the respective snapshot version has been published after GA. This might be the reason for this issue.
Now, how can we heal the patient?
In this case, I advised my friend how to manually update his DB.
Please consult the BPM Support for these actions. Modifying data on DB level is not supported! At least backups should be made before.
The following steps were applied in this specific case (IMPORTANT: Another case might have other IDs and causes – please consult BPM Support):
1) Backup lsw_system table;
2) Run query:
select * from lsw_system where propkey = 'DefaultSnapshotForSystemProject_2066.1b351583-e5cb-43b7-baee-340a63130ea7';
It should return:
3) Update propvalue, change it to 2064.1080ded6-d153-4654-947c-2d16fce170ed
set propvalue = '2064.1080ded6-d153-4654-947c-2d16fce170ed'
where propkey = 'DefaultSnapshotForSystemProject_2066.1b351583-e5cb-43b7-baee-340a63130ea7';
4) Run query in 2) to verify the value has updated.
5) Test the new configuration
Additionally, in order to have the v8.5.7. snapshot as the most recent one, you should set the ORIG_CREATED_ON column of the v220.127.116.11. snapshot in LSW_SNAPSHOT table to an older date than the v8.5.7.’s ORIG_CREATED_ON.
My friend followed my advice and was very happy with the positive results - time for a cold beer payed by my friend.
And if this does not help, take two of these and call me in the morning.
Your Dr. Debug