{"record":{"id":"c13d0b9bae3c9da3","repo":"apereo/cas","slug":"expected-instance-of-clientflowexecutionkey-but-go","errorCode":null,"errorMessage":"Expected instance of ClientFlowExecutionKey but got ","messagePattern":"Expected instance of ClientFlowExecutionKey but got ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/executor/ClientFlowExecutionRepository.java","lineNumber":90,"sourceCode":"\n    @Override\n    public FlowExecution getFlowExecution(final FlowExecutionKey key) throws FlowExecutionRepositoryException {\n        if (key instanceof final ClientFlowExecutionKey clientFlowExecutionKey) {\n            try {\n                val encoded = clientFlowExecutionKey.getData();\n                val state = (SerializedFlowExecutionState) determineTranscoder().decode(encoded);\n\n                if (webflowProperties.getSession().isPinToSession()) {\n                    verifyWebflowSessionIsCorrectlyPinned(state);\n                }\n                val conversationScope = state.getConversationScope();\n                val flow = flowDefinitionLocator.getFlowDefinition(state.getFlowId());\n                return flowExecutionFactory.restoreFlowExecution(state.getExecution(), flow, key, conversationScope, this.flowDefinitionLocator);\n            } catch (final Exception e) {\n                throw new ClientFlowExecutionRepositoryException(\"Error decoding flow execution\", e);\n            }\n        }\n        throw new IllegalArgumentException(\"Expected instance of ClientFlowExecutionKey but got \" + key.getClass().getName());\n    }\n\n\n    @Override\n    public void putFlowExecution(final FlowExecution flowExecution) throws FlowExecutionRepositoryException {\n    }\n\n    @Override\n    public void removeFlowExecution(final FlowExecution flowExecution) throws FlowExecutionRepositoryException {\n    }\n\n    @Override\n    public FlowExecutionKey getKey(final FlowExecution execution) {\n        try {\n            if (webflowProperties.getSession().isPinToSession()) {\n                recordWebflowSessionPinningInfo(execution);\n            }\n            val state = new SerializedFlowExecutionState(execution);","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/executor/ClientFlowExecutionRepository.java#L72-L108","documentation":"getFlowExecution was handed a FlowExecutionKey that is not a ClientFlowExecutionKey, so the client-side repository cannot interpret it; IllegalArgumentException names the actual key class received. The input at fault is the flow execution key — it was produced by a different repository implementation or is otherwise mismatched with the configured one.","triggerScenarios":"Thrown at core/cas-server-core-webflow-api/src/main/java/org/apereo/cas/web/flow/executor/ClientFlowExecutionRepository.java:90 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the webflow execution repository configuration is consistent (client-side repository selected on all nodes)","Clear stale session/flow keys created under a previous repository configuration","Check for mixed CAS node deployments using different execution repositories"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e7288fc434b4f4505b8452e1a57e8fb3111bb863","analyzedAt":"2026-09-08T15:39:16.015Z","contentChangedAt":"2026-09-08T15:39:16.015Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}