Support Article
Getting error com.pega.apache.poi cannot be resolved to a type
SA-38814
Summary
Post upgrade to Pega 7.2.2 facing the below errors while revalidate and saving an old activitiy. This is working fine in earlier Pega 7.1.9.
Error Messages
Failed to compile generated Java com.pegarules.generated.activity.ra_action_gentasktrackingsheetexternal_c515ffdda9caab51c3ef27e428b3c8e0: ----------
1. ERROR in /com/pegarules/generated/activity/ra_action_gentasktrackingsheetexternal_c515ffdda9caab51c3ef27e428b3c8e0.java (at line 282)
com.pega.apache.poi.xssf.usermodel.XSSFWorkbook workbook = new com.pega.apache.poi.xssf.usermodel.XSSFWorkbook();
^^^^^^^^^^^^^^^^^^^
com.pega.apache.poi cannot be resolved to a type
----------
2. ERROR in /com/pegarules/generated/activity/ra_action_gentasktrackingsheetexternal_c515ffdda9caab51c3ef27e428b3c8e0.java (at line 282)
com.pega.apache.poi.xssf.usermodel.XSSFWorkbook workbook = new com.pega.apache.poi.xssf.usermodel.XSSFWorkbook();
^^^^^^^^^^^^^^^^^^^
com.pega.apache.poi cannot be resolved to a type
----------
3. ERROR in /com/pegarules/generated/activity/ra_action_gentasktrackingsheetexternal_c515ffdda9caab51c3ef27e428b3c8e0.java (at line 283)
com.pega.apache.poi.xssf.usermodel.XSSFCreationHelper createHelper = workbook.getCreationHelper();
^^^^^^^^^^^^^^^^^^^
com.pega.apache.poi cannot be resolved to a type
----------
4. ERROR in /com/pegarules/generated/activity/ra_action_gentasktrackingsheetexternal_c515ffdda9caab51c3ef27e428b3c8e0.java (at line 284)
com.pega.apache.poi.xssf.usermodel.XSSFFont font = workbook.createFont();
^^^^^^^^^^^^^^^^^^^
com.pega.apache.poi cannot be resolved to a type
Steps to Reproduce
- Create one activity using com.pega.apache.poi libraries in Pega 7.1.9.
- Upgrade environment to 7.2.2.
- Revalidate and save the activitiy.
Root Cause
An issue in the custom application code or rules
Resolution
Apache POI jar(s) have been upgraded to 3.15 version in Pega 7.2.2 and while doing the upgrade the package name(s) were not renamed to com.pega.apache.*.
Instead it can directly be used, that is, org.apache.poi.
All the Out-of-the-box (OOTB) rule(s) have been updated for the same.
Note: All the activities that user writes explicitly using the jars has to be changed to refer org.apache.poi.
Published July 17, 2017 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.