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

Library compilation fails with save of a function



User has created function (test_funct1,funct1) in one environment and had configured custom code in it.

Later deleted test_funct1. Now after performing an upgrade to  Pega 7.3.1,the custom code in that function is not compatible with the current version of pega.

Hence, when the user tries to edit the function to use the methods that are compatible with, while saving the rule, user receives a compilation error on library generation pointing it to the deleted function test_funct1. 

Error Messages

Not Applicable

Steps to Reproduce

1. Open function which is not able to compile in Pega 7.3.1.
2. Save it in a new ruleset version in same library.
3. Make changes to resolve compiler errors.
4. Try saving the rule. 

Root Cause

Reference of the old version of code in the function still exists in the environment referring to the library.

Hence, compilation errors are thrown while save of the function which which implicitly generate library code. 


Perform either one of the approach to resolve the issue:

Make the versions below the required function ruleset version as "Not available"(or comment the older code which is causing the issue) to ensure that this right rule from the highest available ruleset version with correct code is picked during runtime.

The process to perform this step includes:

  1. Perform check-out of the rule as the rule availability change requires a Save of the rule.
  2. After making it "Not available".
  3. Stop the servers and clear the temp directory(which clears the PRGenJava folder) and then start the server.
  4. Now perform "test function compilation  using the path: Regenerate function >Regenerate library.


The second approach is to use a new library and function with different names with same configuration.

Published July 23, 2018 - 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