# Error when generate pdf with CALCULATE\_PDF\_BY\_DOCUMENT\_ID of Print Engine after upgrade from 2022.02 to 2022.06

**URL:** https://discourse.geta12.com/t/error-when-generate-pdf-with-calculate-pdf-by-document-id-of-print-engine-after-upgrade-from-2022-02-to-2022-06/601
**Category:** Print Engine
**Tags:** 2022-06, upgrade, 2022-02
**Created:** [August 23, 2022, 7:58am UTC](https://discourse.geta12.com/t/error-when-generate-pdf-with-calculate-pdf-by-document-id-of-print-engine-after-upgrade-from-2022-02-to-2022-06/601 "2022-08-23T07:58:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![quynh-wintry-root](https://discourse.geta12.com/letter_avatar_proxy/v4/letter/q/cdc98d/32.png) [@quynh-wintry-root](https://discourse.geta12.com/u/quynh-wintry-root)
#### Post date: [August 23, 2022, 7:58am UTC](https://discourse.geta12.com/t/error-when-generate-pdf-with-calculate-pdf-by-document-id-of-print-engine-after-upgrade-from-2022-02-to-2022-06/601/1 "2022-08-23T07:58:26Z")

</div>

Hi,

We are in the progress of upgrading A12 from 2022.02 to 2022.06.

In 2022.02, we use printEngineVersion: 0.202202002.1  
After upgrading to 2022.06, we cannot run the app with the old version of print-engine then we need to upgrade it to this rc version printEngineVersion: 0.202206000.0-rc\_00000.  
The application runs successfully, but then we met this error when trying to call the CALCULATE\_PDF\_BY\_DOCUMENT\_ID method.

```auto
com.mgmtp.a12.dataservices.exception.NotFoundException: PrintDocumentModel with id SingleTravelExpenseClaim_PrintModel is not available.
	at com.mgmtp.a12.print.engine.core.loaders.PrintModelLoader.lambda$loadModelInsecure$0(PrintModelLoader.java:40) ~[print-engine-core-0.202206000.0-rc_00000.jar:0.202206000.0-rc.0]
	at java.base/java.util.Optional.orElseThrow(Optional.java:408) ~[na:na]
	at com.mgmtp.a12.print.engine.core.loaders.PrintModelLoader.loadModelInsecure(PrintModelLoader.java:40) ~[print-engine-core-0.202206000.0-rc_00000.jar:0.202206000.0-rc.0]
	at com.mgmtp.a12.print.engine.core.loaders.PrintModelLoader.loadModelInsecure(PrintModelLoader.java:25) ~[print-engine-core-0.202206000.0-rc_00000.jar:0.202206000.0-rc.0]
	at com.mgmtp.a12.dataservices.model.persistence.AbstractModelLoader.loadModel(AbstractModelLoader.java:24) ~[dataservices-core-34.1.2.jar:na]
	at com.mgmtp.a12.print.engine.core.loaders.PrintModelLoader.getPrintModelById(PrintModelLoader.java:51) ~[print-engine-core-0.202206000.0-rc_00000.jar:0.202206000.0-rc.0]
	at com.mgmtp.a12.print.engine.core.services.PDFCalculationService.calculatePDF(PDFCalculationService.java:101) ~[print-engine-core-0.202206000.0-rc_00000.jar:0.202206000.0-rc.0]
	at com.mgmtp.a12.print.engine.core.operations.calculations.CalculatePrintPDFByDocumentIdOperation.rpc(CalculatePrintPDFByDocumentIdOperation.java:60) ~[print-engine-core-0.202206000.0-rc_00000.jar:0.202206000.0-rc.0]
	at com.mgmtp.a12.print.engine.core.operations.calculations.CalculatePrintPDFByDocumentIdOperation$$FastClassBySpringCGLIB$$648b4b6d.invoke(<generated>) ~[print-engine-core-0.202206000.0-rc_00000.jar:0.202206000.0-rc.0]

```

- I did use the jar file to migrate the old print model
- I checked and there is a record of “SingleTravelExpenseClaim\_PrintModel” in the model table.  
Is there anything that I miss or I can do to make it work again?

Thank you

---

<div class="post-metadata">

### Author: ![quynh-wintry-root](https://discourse.geta12.com/letter_avatar_proxy/v4/letter/q/cdc98d/32.png) [@quynh-wintry-root](https://discourse.geta12.com/u/quynh-wintry-root)
#### Post date: [August 24, 2022, 6:04am UTC](https://discourse.geta12.com/t/error-when-generate-pdf-with-calculate-pdf-by-document-id-of-print-engine-after-upgrade-from-2022-02-to-2022-06/601/2 "2022-08-24T06:04:29Z")

</div>

I update the printEngineVersion to 0.202206000.0-rc\_00001 and the problem is fixed

---

<div class="post-metadata">

### Author: ![system](https://discourse.geta12.com/user_avatar/discourse.geta12.com/system/32/2016_2.png) [@system](https://discourse.geta12.com/u/system)
#### Post date: [September 7, 2022, 6:04am UTC](https://discourse.geta12.com/t/error-when-generate-pdf-with-calculate-pdf-by-document-id-of-print-engine-after-upgrade-from-2022-02-to-2022-06/601/3 "2022-09-07T06:04:57Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
