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

Unable to generate a library and its functions

SA-57785

Summary



Unable to generate a library and its functions due to 'com.pega.apache.poi cannot be resolved' error.


Error Messages



Error(s) detected while generating java. Compiler reported: ----------
1. ERROR in /com/pegarules/generated/test_ParseExcelDate_011505_JLJiPw8lqpS9bI4WCu7jIA.java (at line 104)
excelDate = com.pega.apache.poi.ss.usermodel.DateUtil.getJavaDate(db);

com.pega.apache.poi cannot be resolved

2. ERROR in /com/pegarules/generated/test_ParseExcelDate_011510_kBJdRTzMeYKwWkkC1hoeZA.java (at line 109)
excelDate = com.pega.apache.poi.ss.usermodel.DateUtil.getJavaDate(db);
com.pega.apache.poi cannot be resolved

2 problems (2 errors)
Compile failed.
Library Name—
The Library failed to compile



Steps to Reproduce

  1. Open a Library which is defined in a function that contains the com.pega.apache.poi definition.
  2. Click Generate Library.


Root Cause



A defect in Pegasystems’ code or rules.

PRPC is upgraded to Pega 7.3. With this upgrade, there are two versions of a library or Rule Utility Function (RUF) which used POI.  In the earlier version, the RUFs are coded for com.pega.apache.poi. In the newer version, org.apache.poi is used.

The issue occurs when compiling the library. When there is only one POI JAR in Pega 7.3 system and the earlier JAR version is not present, the previous RUF version fails to compile. This is because the system could not find the com.pega.apache.poi package.


Resolution



Perform either of following the local-changes:
  • Skim the RUF rulesets.
     
  • Unlock the previous RUF rulesets.

      a. Edit the RUF rules and mark them as unavailable or,
      b. Edit the RUF rule and uncheck the 'Function ready to be compiled?' option or,
      c. Edit the RUF rule to correct the POI package.

     
  • Save As the RUF to a new library with the code changes.

     

Suggest Edit

Published July 23, 2018 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

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