apereo/cas · warning

Unsupported event [ ] for service replication

Error message

Unsupported event [{}] for service replication

What it means

BaseCasRegisteredServiceStreamPublisher.publishInternal dispatches registered-service events to replication publishers. It handles delete, save/load, and (via handleCasRegisteredServiceUpdateEvents) update events; any other event type is logged with this warning and ignored, meaning that event will not be replicated to other nodes.

Solutions

  1. Check the event type being published; only saved/loaded/deleted events are replicated — convert custom events to one of the supported types.
  2. Align versions of cas-server-support-service-registry-stream with the core services module so all supported events are handled.
  3. If the event is benign (e.g. a refresh event that does not need replication), the warning can be ignored.

Example fix

// before
publisher.publish(new MyCustomServiceEvent(service)); // unsupported
// after
publisher.publish(new CasRegisteredServiceSavedEvent(this, service));
Defensive patterns

Strategy: validation

Validate before calling

if (!(event instanceof CasRegisteredServiceSavedEvent
        || event instanceof CasRegisteredServiceLoadedEvent
        || event instanceof CasRegisteredServiceDeletedEvent)) {
    LOGGER.warn("Event [{}] will not be replicated", event);
}

Prevention

When it happens

Trigger: Publishing a CasRegisteredServiceEvent subclass other than the deleted/saved/loaded events handled above (e.g. a custom or newly introduced event type) through the stream publisher.

Common situations: Upgrading CAS where a new service event type was added but the stream publisher module version lags; custom code firing bespoke service-registry events expecting replication.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apereo/cas@e7288fc434 (2026-09-08). Data as JSON: /api/errors/83978b0197aeb49f. Report an issue: GitHub.

Appendix: source

Thrown at support/cas-server-support-service-registry-stream/src/main/java/org/apereo/cas/services/publisher/BaseCasRegisteredServiceStreamPublisher.java:53

    /**
     * Publish internal.
     *
     * @param service     the service
     * @param event       the event
     * @param publisherId the publisher id
     */
    protected void publishInternal(final RegisteredService service, final ApplicationEvent event,
                                   final PublisherIdentifier publisherId) {
        if (event instanceof CasRegisteredServiceDeletedEvent) {
            handleCasRegisteredServiceDeletedEvent(service, event, publisherId);
            return;
        }
        if (event instanceof CasRegisteredServiceSavedEvent || event instanceof CasRegisteredServiceLoadedEvent) {
            handleCasRegisteredServiceUpdateEvents(service, event, publisherId);
            return;
        }
        LOGGER.warn("Unsupported event [{}] for service replication", event);
    }

    /**
     * Handle cas registered service deleted event.
     *
     * @param service     the service
     * @param event       the event
     * @param publisherId the publisher id
     */
    protected void handleCasRegisteredServiceDeletedEvent(final RegisteredService service, final ApplicationEvent event,
                                                          final PublisherIdentifier publisherId) {
    }

    /**
     * Handle cas registered service update events.
     *
     * @param service     the service
     * @param event       the event

View on GitHub (pinned to e7288fc434)