Error while concatenating multiple PDF files

Hi,

We are getting below error while concatenating multiple PDF files using Aspose Total for Java library.

[2023-07-10 07:50:16,234] ERROR abcdef [myclass] Exception while generating Combined PDF:---- SQLRecoverableException: Closed Connection
2023-07-10T07:50:16.245Z INFO PasswordSDKBridge.BasePasswordVaultAgent GetPassword Is password change in progress -> false
[2023-07-10 07:50:16,453] ERROR abcdef [myclass1] myException: error.load
at mymethod(myclass.java:621)
at mymethod1(myclass1.java:43)
at mymethod2(myclass2.java:91)
at mymethod3(myclass.java:68)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

The source code is:

PdfFileEditor pdfEditor = new PdfFileEditor();
pdfEditor.concatenate(inStreamsArr, byteOutStream);

This is running in Tomcat version 9.x (JDK 11.0.18) and the inputStream array points to byte data stored in Oracle 19c DB. Aspose PDF version used is 20.6.

Is this issue fixed in any higher version of Aspose? If yes, please confirm which version has the fix.

Appreciate a quick response to this Urgent issue.

Thanks,
Vinod

@vinod.kesavanpotti

Would you kindly use 23.6 version of the API? You can obtain a 30-days free temporary license in order to evaluate and test with the latest version and if issue still persists, please share your sample PDF documents for our reference so that we can test the scenario in our environment and address it accordingly.

Thanks for the response.

Meanwhile, we got around the issue by using a tweak to the code:

Instead of using below to read the PDF content from BLOB object in DB,
InputStream is = lobHandler.getBlobAsBinaryStream(rs, 2);

Replaced it with below to read the BLOB content into byte array:
byte[] pdf = lobHandler.getBlobAsBytes(rs, 2);
InputStream is = new ByteArrayInputStream(pdf);

lobHandler is instance of org.springframework.jdbc.support.lob.LobHandler.

@vinod.kesavanpotti

It is nice to know that you were able to sort our the issue. Please feel free to create a new topic in case you need further assistance.