[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.