Switching to a different language makes the Service Portal widgets fail. There are javascript errors and a Nullpointer Exception seen on the screen and the console log contains the script for the widget that fails.

The following error is seen:

2018-12-10 07:52:47 (559) Default-thread-6 CA19F569DB12EB00C0B77B47F49619C6 txid=a79cb9a9db52 [DefaultTranslationProvider] Loading translations for: table=sc_category, hierarchy=[sc_category, sys_metadata, sc_category_top_n], id=a0b960a90f463a40a919f68ce1050ee1, language=fr, source=sys_translated_text
2018-12-10 07:52:47 (560) Default-thread-6 CA19F569DB12EB00C0B77B47F49619C6 txid=a79cb9a9db52 WARNING *** WARNING *** Evaluator: java.lang.NullPointerException
Caused by error in <refname> at line 160


Kingston Patch 9 and onwards.



This is seen because of bad data in the sys_translated_text table. There can be records with empty Field name and Value columns linked to a document key which also might have the valid translations present as well. When looking for translations, the system can encounter these empty records and throw null pointer exceptions and cause the widget load failure.


The simplest way to fix this issue would be to remove the bad data. Deleting these empty records fixes the problem.


These empty records can be found by looking at the node logs and finding the errors thrown when the issue happens. The errors contain the sys id of the document for which the translation caused the null pointer exception. This sys id can be looked for in the document column on the sys_translated_text table to find the empty/bad data.


Article Information

Last Updated:2018-12-11 08:49:04