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

Missing pdfbox Library after upgrade to 7.2.2

SA-33251

Summary



After setting up a new DEV environment with version 7.2.2, try to compile existing functions, create new functions, compile existing libraries or try to create a new function referencing pdfbox an ERROR occurs indicating the library com.pega.apache.pdfbox is missing.

Error Messages



Error(s) detected while generating java. Compiler reported: ---------- 1. ERROR in /com/pegarules/generated/passwordProtectPDF_010159_yVqqrX7s0uDaqqkZBflJdQ.java (at line 98) com.pega.apache.pdfbox.pdmodel.PDDocument doc=null; ^^^^^^^^^^^^^^^^^^^^^^ com.pega.apache.pdfbox cannot be resolved to a type ---------- 2. ERROR in /com/pegarules/generated/passwordProtectPDF_010159_yVqqrX7s0uDaqqkZBflJdQ.java (at line 99) com.pega.apache.pdfbox.pdmodel.encryption.AccessPermission ap=null; ^^^^^^^^^^^^^^^^^^^^^^ com.pega.apache.pdfbox cannot be resolved to a type ---------- 3. ERROR in /com/pegarules/generated/passwordProtectPDF_010159_yVqqrX7s0uDaqqkZBflJdQ.java (at line 100) com.pega.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy spp=null; ^^^^^^^^^^^^^^^^^^^^^^ com.pega.apache.pdfbox cannot be resolved to a type ---------- 4. ERROR in /com/pegarules/generated/passwordProtectPDF_010159_yVqqrX7s0uDaqqkZBflJdQ.java (at line 110) doc=com.pega.apache.pdfbox.pdmodel.PDDocument .load( bis ); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ com.pega.apache.pdfbox.pdmodel.PDDocument cannot be resolved to a type ---------- 5. ERROR in /com/pegarules/generated/passwordProtectPDF_010159_yVqqrX7s0uDaqqkZBflJdQ.java (at line 111) ap=new com.pega.apache.pdfbox.pdmodel.encryption.AccessPermission(); ^^^^^^^^^^^^^^^^^^^^^^ com.pega.apache.pdfbox cannot be resolved to a type ---------- 6. ERROR in /com/pegarules/generated/passwordProtectPDF_010159_yVqqrX7s0uDaqqkZBflJdQ.java (at line 113) spp=new com.pega.apache.pdfbox.pdmodel.encryption.StandardProtectionPolicy( UserName, Password, ap); ^^^^^^^^^^^^^^^^^^^^^^ com.pega.apache.pdfbox cannot be resolved to a type ---------- 6 problems (6 errors) Compile failed.


Steps to Reproduce

  1. Install Pega Version 7.2.1.
  2. Create function that references any com.pega.apache.pdfbox.{class} class.
  3. Compile and execute the function successfully.
  4. Then upgrade this system to 7.2.2.
  5. Open an existing function library referencing any com.pega.apache.pdfbox.{class} class and try to compile it.


Root Cause



Pdfbox is still present in Pega 7.2.2. however the inclusion of some third party jars was refactored in 7.2.2. and specifically prpdfbox 1.8.8 was changed to pdfbox 2.0.1 AND the pega namespace was removed.

Resolution



Assuming the functions that fail to compile are custom, the references to the pega prefixed pdfbox classes will need to be refactored and reverted to the original org.apache ones (remove com.pega. and replace with org.) For example, in 7.2.1 the class com.pega.apache.pdfbox.pdmodel.PDDocument will now be org.apache.pdfbox.pdmodel.PDDocument in 7.2.2.

Suggest Edit

Published February 3, 2017 - Updated October 8, 2020

Did you find this content helpful? Yes No

100% found this useful

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