{"record":{"id":"2a7917d428450956","repo":"apereo/cas","slug":"ticket-is-not-registered-in-the-catalog-and-i","errorCode":null,"errorMessage":"Ticket [{}] is not registered in the catalog and is unrecognized","messagePattern":"Ticket \\[(.+?)\\] is not registered in the catalog and is unrecognized","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"support/cas-server-support-geode-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/GeodeTicketRegistry.java","lineNumber":127,"sourceCode":"                val query = cache.cache().getQueryService().newQuery(queryString);\n                val digestedId = digestIdentifier(principalId);\n                val results = (Collection<String>) query.execute(digestedId);\n                cache.region().removeAll(results);\n                return results.size();\n            }))\n            .sum();\n    }\n\n    @Override\n    public Ticket getTicket(final String ticketIdToGet, final Predicate<Ticket> predicate) {\n        val ticketId = digestIdentifier(ticketIdToGet);\n        if (StringUtils.isBlank(ticketId)) {\n            return null;\n        }\n        LOGGER.debug(\"Encoded ticket id is [{}]\", ticketId);\n        val metadata = ticketCatalog.find(ticketIdToGet);\n        if (metadata == null) {\n            LOGGER.warn(\"Ticket [{}] is not registered in the catalog and is unrecognized\", ticketIdToGet);\n            return null;\n        }\n        val cache = getCacheFromMetadata(metadata);\n        LOGGER.trace(\"Located cache region [{}] for ticket id [{}]\", cache.region().getName(), ticketId);\n        val ticket = cache.region().get(ticketId);\n        LOGGER.trace(\"Located ticket from cache for ticket id [{}] is [{}]\", ticketId, ticket);\n        if (ticket == null) {\n            LOGGER.debug(\"No ticket by id [{}] is found in the ignite ticket registry\", ticketId);\n            return null;\n        }\n        val result = decodeTicket(ticket.getTicket());\n        return predicate.test(result) ? result : null;\n    }\n\n    @Override\n    public Collection<? extends Ticket> getTickets() {\n        try (val stream = stream()) {\n            return stream.collect(Collectors.toSet());","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/support/cas-server-support-geode-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/GeodeTicketRegistry.java#L109-L145","documentation":"GeodeTicketRegistry.getTicket() encodes the ticket id, then looks up its metadata in the ticket catalog. If no catalog entry exists for that ticket id prefix, the registry cannot determine which Geode cache region to query; it logs this warning and returns null. Callers should treat the ticket as expired/unknown (InvalidTicketException downstream).","triggerScenarios":"getTicket(ticketId) called with an id whose prefix (e.g. TGT-, ST-, PGT-) has no registered ticket definition in the catalog - malformed ticket ids, custom ticket types not registered, or ids passed with the wrong prefix/case.","commonSituations":"Client sends a ticket id from a different CAS deployment with different ticket definitions; custom ticket types added to the registry but not the catalog; truncated or hand-crafted ticket strings in test scripts.","solutions":["Register the ticket definition for the id prefix via the ticket catalog configuration","Check that the ticket id being resolved is well-formed and originates from this CAS deployment","Enable trace logging to inspect the encoded id being looked up and compare its prefix to catalog entries"],"exampleFix":"// before: custom ticket never registered\n// custom XYZ- prefix missing from catalog\n// after\n@Override\nprotected void addTicketToCatalog(final DefaultTicketDefinitionBuilder builder) {\n    builder.buildAndRegisterTicketDefinition(this.catalog, \"XYZ\", XyzTicket.class, PolicyMethod.ATTRIBUTE);\n}","handlingStrategy":"validation","validationCode":"var metadata = ticketCatalog.find(ticketId);\nif (metadata == null) {\n    LOGGER.warn(\"Unknown ticket id prefix: {}\", ticketId);\n}","typeGuard":"boolean isKnownTicket(var catalog, String id) { return id != null && catalog.find(id) != null; }","tryCatchPattern":"try {\n    Ticket t = ticketRegistry.getTicket(ticketId, TicketGrantingTicket.class);\n} catch (InvalidTicketException e) {\n    handleUnknownOrExpiredTicket(ticketId);\n}","preventionTips":["Register every custom ticket type in the ticket catalog","Never fabricate ticket ids outside the CAS ticket-granting flow","Handle null/InvalidTicket results as session-expired rather than retrying"],"tags":["geode","ticket-registry","ticket-catalog","unknown-ticket"],"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"}