Export to Excel throws error 500

Export to Excel throws error 500. 


2019-06-13 10:14:35.295 INFO [http-nio-8080-exec-871] org.apache.catalina.core.StandardWrapperValve.invoke 2019-06-13 10:14:35,295 [http-nio-8080-exec-871] ERROR com.appiancorp.ps.exceltools.servlet.ExportDataSubsetToExcelFromProcessServlet -
java.lang.ClassCastException

  Discussion posts and replies are publicly visible

  • 0
    Certified Lead Developer

    There can be multiple configuration errors that might lead to this error. So verify if the current implementation matches the below steps:

    1. The process has a variable named 'input' of type text in it.

    2. The 'input' variable should have json data containing the filters values for the datasubset. 

    3. The expression rule which is responsible to return the final datasuset for excel also, has 'input' variable and here use tojson() to get the filter field values. 

    4. The fieldNames of the table/cdt must match the fieldNames of ExportableDataSubset

    If above all are already fulfilled and still error is there then we can try to look further. 

  • thanks for your answer

    2.Checked

    3. Checked

    4. The fieldNames of the table/cdt must match the fieldNames of ExportableDataSubset - Checked

    All look like fine. 

  • 0
    Certified Lead Developer
    in reply to dariab0002

    By any chance, do you have any nested cdt in the datasubset?

  • No....

    ExportableDataSubset
        fieldNames: List of Text String: 28 items
            "id"
            "customerId"
            "customerName"
            "accountNumber"
            "amount"
            "currencyCode"
            "paymentAmount"
            "paymentCurrencyCode"
            "exchangeRate"
            "beneficiaryBankCode"
            "beneficiaryBankCountry"
            "beneficiaryAccountNumber"
            "statusName"
            "transactionTypeName"
            "totalCharges"
            "chargeTypeName"
            "purposeCode"
            "transactionId"
            "createdAt"
            "source"
            "creditValueDate"
            "sameDay"
            "branchMaker"
            "branchChecker"
            "operationMaker"
            "operationChecker"
            "step"
            "action"
        fieldLabels: List of Text String: 28 items
            "Transfer Id"
            "Customer Id"
            "Customer Name"
            "Customer Account"
            "Amount"
            "Currency"
            "Converted Amount"
            "Converted Currency"
            "Exchange Rate"
            "Beneficiary Bank"
            "Beneficiary Bank Country"
            "Beneficiary Account"
            "Status"
            "Transaction Type"
            "Total Charges"
            "Charge Type"
            "Purpose Code"
            "Transaction ID"
            "Date"
            "Source"
            "Credit Value Date"
            "Same Day"
            "Branch Maker"
            "Branch Checker"
            "Operation Maker"
            "Operation Checker"
            "Stage"
            "Action"
        datasubset: DataSubset
            startIndex: 1
            batchSize: -1
            sort: null (List of SortInfo)
            totalCount: 30
            data: List of Dictionary: 30 items
                Dictionary
                    id: 44444444
                    customerId: "4564654646"
                    customerName: "sdfdsfsdfsdfdsf"
                    accountNumber: "1321313115454"
                    amount: 10
                    currencyCode: "ss"
                    paymentAmount: 1
                    paymentCurrencyCode: "ss"
                    exchangeRate: 1
                    beneficiaryBankCode: "asdaddss"
                    beneficiaryBankCountry: "dd"
                    beneficiaryAccountNumber: "45341354"
                    statusName: "ddddd"
                    transactionTypeName: "Local"
                    totalCharges: 0
                    chargeTypeName: "OUR"
                    purposeCode: "any"
                    transactionId: null (Text)
                    source: "Branch"
                    createdAt: "06/13/2019 06:12:24"
                    creditValueDate: "06/13/2019"
                    sameDay: "No"
                    branchMaker: null (Null)
                    branchChecker: null (Null)
                    operationMaker: null (Null)
                    operationChecker: null (Null)
                    step: "gggg"
                    action: "g"

  • Make sure while populating field names of ExportableDataSubset, its properly cast to particular data type of each fields and if your using looping functions then make sure its output data type as well.

  • Thanks for your answer, I figured it out yesterday.  And it was a reason for this error. it related to 2 text fields