Failed to extract 'pega_rules_utilities' while running update
LibraryFunctionNotFoundException occurs during Pega 7.1 update to Pega 7.4.
[ ] [STANDARD] [ ] [ ] (lyGeneratedKey._baseclass.When) ERROR - Exception caught while evaluating when com.pega.pegarules.pub.runtime.LibraryFunctionNotFoundException: Failed to extract 'pega_rules_utilities'
Errors in the pega_rules_utilities Compile logs:
ERROR in \com\pegarules\generated\doRafHTMLProperty_060101__4231114936949211378.java (at line 132) java.util.Iterator enum = objListPage.getProperty("pxResults").iterator();
Syntax error on token "enum", delete this token
Steps to Reproduce
Update Pega 7.1 to Pega 7.4.
On querying the database with the following query, a record was found with an old version of the doRafHTMLProperty function (Pega-RULES:06-01-01 ruleset).
select * from pegarules.pr4_rule_library where pzinskey like '%DORAFHTMLPROPERTY%';
In the earlier versions of Pega, the doRafHTMLProperty function contained references to a variable named 'enum'. Since, 'enum' is a reserved word in later Java releases, these references are replaced with 'enum1' in Pega 7.
Therefore, any code that still references 'enum' fail to compile in Pega 7.
Perform the following local-change:
- Back up the pr4_rule_library table.
- Run the following query to remove references to the older version of the function.
delete from pegarules.pr4_rule_library where pzinskey like '%DORAFHTMLPROPERTY%' and pyrulesetversion='06-01-01';
- Resume the upgrade.