Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

ML7 update fails during UpgradeRuleMessages due to Lexical error



Pega 7.1.6 to 7.1.7 UPDATE fails with RuntimeException in update logs.

Error Messages

[java] Exception in thread "ip-1-1-1-1" java.lang.RuntimeException: Problem during method invocation (main) 

[java] Caused by: Lexical error at line 1, column 95. Encountered: "T" (84), after : "\\" 
[java] at 

[java] at 
[java] at com.pegarules.generated.activity.ra_action_pzupgraderulemessages_ebb9b00a33b1e148d853d8cd3a43ee07.step2_1_circum0(

[java] at com.pega.pegarules.deploy.internal.util.UpgradeRuleMessages.main( 

/smartpaas-backup/vol3/pega7softwares/114717_Pega717-UPD/scripts/setupDatabase.xml:374: The following error occurred while executing this line: 
/smartpaas-backup/vol3/pega7softwares/114717_Pega717-UPD/scripts/setupDatabase.xml:2268: Java returned: 1 

Total time: 95 minutes 21 seconds 

Steps to Reproduce

1. Create a Rule-Message instance in Pega 7.1.6 with '\' in its identifier name. (this will be created but you won't be able to open this Rule again) 

2. Run ML7 update process.

Root Cause

pzupgraderulemessages activity was introduced in Pega 7.1.7 to re-calculate the pzInsKey of Rule-Message instances. These instances are migrated to a new table PR4_RULE_MESSAGES and the property, pyClassName was made part of key. So, running this activity is mandatory as part of upgrade/update process starting from Pega 7.1.7. 

This activity selects each Rule-Message instance using its pzInsKey and checks if it needs to be recalculated. To fetch the Rule-Message record a plain SQL was used which does not escape any special characters in the pzInsKey (\ etc). User has around 60 Rule-Messages that have '\' in their pzInsKey. As the activity does not escape these characters the activity was throwing an exception and halting the UPDATE process.


Instead of using a plain SQL, we should be using a prepared statement which takes care of escaping characters. HFix-20900 has been devised for the same in Pega 7.1.7.

Before running the UPDATE process, edit setupDatabase.xml file, locate the target “Update Finalization“ and remove “Upgrade Rule Messages” from depends. With this change user will be able to update to ML7 without any issues. Post UPDATE process, user needs to apply this HFix-20900 and run the pzUpgradeRuleMessages manually.

Published January 31, 2016 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us