{"record":{"id":"7398330ebdbf2463","repo":"apereo/cas","slug":"no-registered-service-is-found-to-match-or-ac","errorCode":null,"errorMessage":"No registered service is found to match [{}] or access is denied. Using default theme [{}]","messagePattern":"No registered service is found to match \\[(.+?)\\] or access is denied\\. Using default theme \\[(.+?)\\]","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"support/cas-server-support-themes-core/src/main/java/org/apereo/cas/services/web/RegisteredServiceThemeResolver.java","lineNumber":83,"sourceCode":"\n    protected final ObjectProvider<AuthenticationServiceSelectionPlan> authenticationRequestServiceSelectionStrategies;\n\n    protected final ObjectProvider<CasConfigurationProperties> casProperties;\n\n    @NonNull\n    @Override\n    public String resolveThemeName(final HttpServletRequest request) {\n        val context = RequestContextHolder.getRequestContext();\n        val serviceContext = WebUtils.getService(context);\n        val service = FunctionUtils.doUnchecked(() -> authenticationRequestServiceSelectionStrategies.getObject().resolveService(serviceContext));\n        if (service == null) {\n            LOGGER.trace(\"No service is found in the request context. Falling back to the default theme [{}]\", getDefaultThemeName());\n            return rememberThemeName(request);\n        }\n\n        val registeredService = (WebBasedRegisteredService) servicesManager.getObject().findServiceBy(service);\n        if (registeredService == null || !registeredService.getAccessStrategy().isServiceAccessAllowed(registeredService, service)) {\n            LOGGER.warn(\"No registered service is found to match [{}] or access is denied. Using default theme [{}]\", service, getDefaultThemeName());\n            return rememberThemeName(request);\n        }\n        if (StringUtils.isBlank(registeredService.getTheme())) {\n            LOGGER.trace(\"No theme name is specified for service [{}]. Using default theme [{}]\", registeredService, getDefaultThemeName());\n            return rememberThemeName(request);\n        }\n\n        val themeName = determineThemeNameToChoose(request, service, registeredService);\n        return rememberThemeName(request, themeName);\n    }\n    \n    protected String determineThemeNameToChoose(final HttpServletRequest request,\n                                                final Service service,\n                                                final WebBasedRegisteredService registeredService) {\n        HttpResponse response = null;\n        try {\n            LOGGER.debug(\"Service [{}] is configured to use a custom theme [{}]\", registeredService, registeredService.getTheme());\n","sourceCodeStart":65,"sourceCodeEnd":101,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/support/cas-server-support-themes-core/src/main/java/org/apereo/cas/services/web/RegisteredServiceThemeResolver.java#L65-L101","documentation":"RegisteredServiceThemeResolver.resolveThemeName looks up the registered service matching the request's service parameter via ServicesManager. If no registered service matches, or the service's access strategy denies access, the resolver logs this warning and falls back to the default theme instead of the service-specific theme.","triggerScenarios":"A request arrives with a service parameter that does not match any registered service in the registry, or matches one whose RegisteredServiceAccessStrategy.isServiceAccessAllowed() returns false (service disabled, expired, unauthorized caller, etc.).","commonSituations":"Service not yet registered/loaded in the service registry; service registry file/repo not replicated to this node; service marked disabled or unauthorized by access strategy; caller IP/URL pattern excluded by the service's access strategy.","solutions":["Register (or enable) a service definition whose serviceId pattern matches the incoming service URL.","Inspect the matched service's access strategy and re-enable access or authorize the caller.","Confirm the service registry is loaded/synchronized on this CAS node.","Verify the service parameter in the request URL matches the serviceId regex exactly."],"exampleFix":"// before: service disabled\n\"accessStrategy\": { \"@class\": \"org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy\", \"enabled\": false }\n// after\n\"accessStrategy\": { \"@class\": \"org.apereo.cas.services.DefaultRegisteredServiceAccessStrategy\", \"enabled\": true, \"ssoEnabled\": true }","handlingStrategy":"validation","validationCode":"// verify service resolves and access is allowed before expecting a custom theme\nRegisteredService svc = servicesManager.findServiceBy(serviceUrl);\nif (svc == null) throw new IllegalStateException(\"No service registered for \" + serviceUrl);\nif (!((WebBasedRegisteredService) svc).getAccessStrategy().isServiceAccessAllowed(svc, serviceUrl))\n    throw new IllegalStateException(\"Access denied for \" + svc.getName());","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Register service definitions before pointing clients at CAS.","Keep service registry synchronized across all CAS nodes.","Audit accessStrategy.enabled/ssoEnabled flags when themes silently fall back."],"tags":["themes","service-registry","access-control","fallback"],"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"}