{"record":{"id":"56aeeb599e0f8416","repo":"apache/maven","slug":"error-invoking-function-methodname-e-cause","errorCode":null,"errorMessage":"Error invoking function '{methodName}': {e}. Cause chain: {causeChain}","messagePattern":"Error invoking function '(.+?)': (.+?)\\. Cause chain: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionProfileActivator.java","lineNumber":139,"sourceCode":"            if (methodName.endsWith(\"_\")) {\n                methodName = methodName.substring(0, methodName.length() - 1);\n            }\n            final String finalMethodName = methodName;\n\n            functions.put(finalMethodName, args -> {\n                try {\n                    return method.invoke(conditionFunctions, args);\n                } catch (Exception e) {\n                    StringBuilder causeChain = new StringBuilder();\n                    Throwable cause = e;\n                    while (cause != null) {\n                        if (!causeChain.isEmpty()) {\n                            causeChain.append(\" Caused by: \");\n                        }\n                        causeChain.append(cause);\n                        cause = cause.getCause();\n                    }\n                    throw new RuntimeException(\n                            \"Error invoking function '\" + finalMethodName + \"': \" + e + \". Cause chain: \" + causeChain,\n                            e);\n                }\n            });\n        }\n\n        return functions;\n    }\n\n    /**\n     * Retrieves the value of a property from the project context.\n     * Special function used to support the <code>${property}</code> syntax.\n     *\n     * The profile activation is done twice: once on the file model (so the model\n     * which has just been read from the file) and once while computing the effective\n     * model (so the model which will be used to build the project). We do need\n     * those two activations to be consistent, so we need to restrict access to\n     * properties that cannot change between file and effective model.","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/apache/maven/blob/e4093d4e120eac99d6bdce5ba67cace2f3085c97/impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionProfileActivator.java#L121-L157","documentation":"Error \"Error invoking function '{methodName}': {e}. Cause chain: {causeChain}\" thrown in apache/maven.","triggerScenarios":"Thrown at impl/maven-impl/src/main/java/org/apache/maven/impl/model/profile/ConditionProfileActivator.java:139 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e4093d4e120eac99d6bdce5ba67cace2f3085c97","analyzedAt":"2026-08-21T22:58:24.034Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}