[URGENT] java.lang.ClassCastException: com.aspose.pdf.internal.l21p.l46u cannot be cast to com.aspose.pdf.internal.l21p.l36v

Hi , was doing good all the time in Local. however, when deployed to UAT , it not working for all PDF Files when trying to convert to XLSX. most of it hitting the issues as below . Could anyone please provide any solution? or at least temporary solution ? thanks

java.lang.ClassCastException: com.aspose.pdf.internal.l21p.l46u cannot be cast to com.aspose.pdf.internal.l21p.l36v
	at com.aspose.pdf.internal.l5v.lI.lI(Unknown Source)
	at com.aspose.pdf.internal.l5v.lj.lI(Unknown Source)
	at com.aspose.pdf.internal.l4p.lu.lj(Unknown Source)
	at com.aspose.pdf.internal.l4p.lu.lb(Unknown Source)
	at com.aspose.pdf.internal.l4p.lu.lf(Unknown Source)
	at com.aspose.pdf.internal.l4p.lu.lf(Unknown Source)
	at com.aspose.pdf.l14j.lI(Unknown Source)
	at com.aspose.pdf.l14j.lb(Unknown Source)
	at com.aspose.pdf.ApsUsingConverter.lI(Unknown Source)
	at com.aspose.pdf.ApsUsingConverter.lf(Unknown Source)
	at com.aspose.pdf.ApsUsingConverter.lf(Unknown Source)
	at com.aspose.pdf.FlowConverter.convertWithNewEngine(Unknown Source)
	at com.aspose.pdf.FlowConverter.convertInternal(Unknown Source)
	at com.aspose.pdf.ADocument.lj(Unknown Source)
	at com.aspose.pdf.ADocument.lI(Unknown Source)
	at com.aspose.pdf.Document.lI(Unknown Source)
	at com.aspose.pdf.ADocument.lI(Unknown Source)
	at com.aspose.pdf.ADocument.save(Unknown Source)
	at com.aspose.pdf.Document.save(Unknown Source)

@igb.ai

Please share some code snippet and the sample file for our reference so that we can test the scenario in our environment and address it accordingly.

    public static void convertToExcel(MultipartFile file, String outputFilePath, String licensePath) throws Exception {
        try {
            License license = new License();
            license.setLicense(new FileInputStream(licensePath));
            if (Document.isLicensed()) {
                System.out.println("License is Set!");
            }
            Document pdfDoc = new Document(file.getInputStream());
            ExcelSaveOptions excelSave = new ExcelSaveOptions();
            excelSave.setFormat(ExcelSaveOptions.ExcelFormat.XLSX);
            excelSave.setMinimizeTheNumberOfWorksheets(true);
            pdfDoc.save(outputFilePath, excelSave);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

as simple as this only, not happening in all cases, just some cases and some environments.

by using the same file in Local can work well but when comes to other environment it hit the error

@igb.ai

Are you using multiple Aspose APIs? If so, have you tried using the classes with complete namespace? Also, please share the problematic document with environment details which we can use to replicate the issue.

Im only using Aspose PDF, considering privacy issue I cant provide the file im using, i think i can only tell that my environment is using AWS argocd

Let me elaborate more of the scenario, I’m trying to convert PDF to XLSX.

  1. File A can be convert successfully in my Local, and also in my UAT environment.
  2. File B can be convert successfully in my Local, but hitting this issue "java.lang.ClassCastException: com.aspose.pdf.internal.l21p.l46u cannot be cast to com.aspose.pdf.internal.l21p.l36v
    and failed to convert.

@igb.ai

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFJAVA-43721

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi can have an estimated time when will it be fixed? thanks

@igb.ai

We are afraid that we cannot provide any ETA at the moment because the ticket will be investigated and resolved on first come first serve basis as per the free support policies. Your concerns have been recorded and as soon as we make some progress in this regard, we will inform you. Please be patient and spare us some time.

We are sorry for the inconvenience.

Hello, any updates on this issues. I’m still hitting this issue… Appreciate your attention on this matter. So that we can run our program smoothly.

@igb.ai

We need to know the Java version, that is used in the your environment when you are using AWS argocd an other details about environment that could help us with reproducing the issue.

Hi , here you go… please help to investigate

jdk 8
gradle 6.9.2

@igb.ai

Thanks for sharing. We have recorded the information and will carry on our investigation accordingly.

image.png (6.3 KB)

looks like it only happen when the provider is iText ? can explore and investigate further.

@igb.ai

Thanks for the insight. We will investigate from this perspective as well.

Any updates?

@igb.ai

We are afraid that the ticket has not been yet resolved due to other tasks in the queue. Nevertheless, your concerns have been recorded and we will surely inform you as soon as we make some progress towards ticket resolution. Please be patient and spare us some time.

We are sorry for the inconvenience.

This issue since march until now, nearly more than 4 months already, affecting the BAU process.

Kindly assist to escalate this issue.

Much appreciated.

@igb.ai
I once again drew the attention of the development team to your task and raised the priority of the task to the maximum possible in this situation.

Any updates? since 20th Mar until Sep already…

image.png (2.6 KB)

additionally , would like to also raise pdf convert to excel accuracy issue. the 3 column Balance Branch Time supposed to be separated. but it merged into one column now .

Kindly assist to ensure the accuracy of converting is good enough