{"record":{"id":"4c84749c7a02885c","repo":"apereo/cas","slug":"no-ticket-definition-could-be-found-in-the-catalog-4c8474","errorCode":null,"errorMessage":"No ticket definition could be found in the catalog to match [{}]","messagePattern":"No ticket definition could be found in the catalog to match \\[(.+?)\\]","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"support/cas-server-support-hazelcast-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/HazelcastTicketRegistry.java","lineNumber":122,"sourceCode":"            return null;\n        }\n        val metadata = ticketCatalog.find(ticketId);\n        if (metadata != null) {\n            val map = getTicketMapInstanceByMetadata(metadata);\n            if (map != null) {\n                val document = map.get(encTicketId);\n                if (document != null && document.getTicket() != null) {\n                    val result = decodeTicket(document.getTicket());\n                    if (predicate != null && predicate.test(result)) {\n                        return result;\n                    }\n                }\n                return null;\n            } else {\n                LOGGER.error(\"Unable to locate ticket map for ticket definition [{}]\", metadata);\n            }\n        }\n        LOGGER.warn(\"No ticket definition could be found in the catalog to match [{}]\", ticketId);\n        return null;\n    }\n\n    @Override\n    public long deleteSingleTicket(final Ticket ticketToDelete) {\n        val encTicketId = digestIdentifier(ticketToDelete.getId());\n        val metadata = ticketCatalog.find(ticketToDelete);\n        val map = getTicketMapInstanceByMetadata(metadata);\n        return map != null && map.remove(encTicketId) != null ? 1 : 0;\n    }\n\n    @Override\n    public long deleteAll() {\n        return ticketCatalog.findAll()\n            .stream()\n            .map(this::getTicketMapInstanceByMetadata)\n            .filter(Objects::nonNull)\n            .mapToInt(instance -> {","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/support/cas-server-support-hazelcast-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/HazelcastTicketRegistry.java#L104-L140","documentation":"HazelcastTicketRegistry.getTicket logs this warning and returns null when the TicketCatalog contains no TicketDefinition whose prefix matches the given ticket id. Without a definition, the registry cannot determine which Hazelcast map to query, so the lookup can never succeed. Callers will typically see this as 'ticket not found' / SSO redirect to login.","triggerScenarios":"getTicket(ticketId) with an id whose prefix (e.g. 'TGT-', 'ST-', 'PT-') matches no registered TicketDefinition — malformed/truncated ticket ids, tickets from an older CAS version with different prefixes, or custom ticket types whose definitions were never registered in the catalog.","commonSituations":"Client presents a corrupted or hand-crafted ticket id; CAS upgraded and ticket id prefixes changed while old tickets persist in shared Hazelcast; multiple CAS instances with different TicketCatalogs sharing one Hazelcast cluster; passing a full ticket object's wrong field (e.g. encoded id without prefix).","solutions":["Check the ticket id being requested — confirm it has a valid CAS prefix and is not truncated or URL-decoded incorrectly.","Verify the TicketCatalog registers definitions for all ticket prefixes present in the shared Hazelcast cluster (especially custom tickets).","If old tickets use legacy prefixes, flush the shared map or register compatibility definitions.","Ensure all CAS nodes behind the shared registry run the same ticket catalog configuration."],"exampleFix":"// before\nString ticketId = request.getParameter(\"ticket\").substring(0, 20); // truncated\n// after\nString ticketId = request.getParameter(\"ticket\"); // pass the full id intact","handlingStrategy":"type-guard","validationCode":"// Check the ticket id has a known prefix before calling getTicket\nvar prefixes = ticketCatalog.findAllStream().map(d -> d.getProperties().getPrefix()).toList();\nif (prefixes.stream().noneMatch(ticketId::startsWith)) {\n    logger.warn(\"Ignoring ticket id {} with unknown prefix\", ticketId);\n    return null;\n}","typeGuard":"boolean isKnownTicketId(String ticketId) {\n    return ticketId != null && ticketCatalog.findAllStream()\n        .anyMatch(d -> ticketId.startsWith(d.getProperties().getPrefix()));\n}","tryCatchPattern":null,"preventionTips":["Never truncate or transform ticket ids between receipt and registry lookup.","Keep TicketCatalog definitions identical across all CAS nodes sharing a Hazelcast cluster.","Clean legacy ticket maps after version upgrades if prefixes changed.","Validate incoming ticket ids against known prefixes before hitting the registry."],"tags":["hazelcast","tickets","ticket-catalog","lookup"],"backgroundTag":"record-not-found","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"}