When cloning the following ESC Header
https://<your instance>/nav_to.do?uri=sp_header_footer.do?sys_id=bda7abc623882300fb0c949e27bf6544 bda7abc623882300fb0c949e27bf6544
When running the cloned widget in Service Portal, get the following error:
JavaException: java.lang.SecurityException: Illegal access to getter method getLocalizedMessage in class java.lang.Throwable
Confirmed in Orlando
They are due to RCA privilege files that get generated for the cloned header.
Setting the files to 'Allowed', this should make the error messages to go away.
I see the same RCA privilege files added for our out-of-box ESC Header (can be seen if you navigate to /sys_restricted_caller_access_list.do?sysparm_query=operation%3Dread%5Esource%3Dbda7abc623882300fb0c949e27bf6544), so these files seem to be necessary for the cloned headers in order to access those scoped tables.
Set the files to Allowed by creating a new Restricted Caller Access Privileges for your Cloned Header