Gateway Interceptor Documentation Example is broken

Hi,
I have tried to implement a Zeebe Interceptor and followed the documentation: Interceptors | Camunda 8 Docs

Bundling the example code to a fat jar and then loading it in the gateway results in the following error:

2024-02-19 17:46:19 2024-02-19 16:46:19.913 [Broker-0] [zb-actors-0] [Startup] WARN
2024-02-19 17:46:19 io.camunda.zeebe.broker.system - Aborting startup process due to exception during step Embedded Gateway
2024-02-19 17:46:19 java.util.concurrent.CompletionException: io.camunda.zeebe.gateway.interceptors.impl.InterceptorLoadException: Cannot load interceptor [logging-interceptor]: specified class does not implement ServerInterceptor
2024-02-19 17:46:19 at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source) ~[?:?]
2024-02-19 17:46:19 at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source) ~[?:?]
2024-02-19 17:46:19 at java.base/java.util.concurrent.CompletableFuture.biApply(Unknown Source) ~[?:?]
2024-02-19 17:46:19 at java.base/java.util.concurrent.CompletableFuture$BiApply.tryFire(Unknown Source) ~[?:?]
2024-02-19 17:46:19 at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source) ~[?:?]
2024-02-19 17:46:19 at java.base/java.util.concurrent.CompletableFuture.complete(Unknown Source) ~[?:?]
2024-02-19 17:46:19 at io.camunda.zeebe.gateway.Gateway.lambda$submitActorToActivateJobs$3(Gateway.java:306) ~[zeebe-gateway-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at java.base/java.util.function.Consumer.lambda$andThen$0(Unknown Source) ~[?:?]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.Actor$ActorBuilder$1.accept(Actor.java:180) ~[zeebe-scheduler-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.Actor$ActorBuilder$1.accept(Actor.java:164) ~[zeebe-scheduler-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.Actor$1.onActorStarted(Actor.java:90) ~[zeebe-scheduler-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.ActorJob.invoke(ActorJob.java:94) [zeebe-scheduler-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.ActorJob.execute(ActorJob.java:47) [zeebe-scheduler-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.ActorTask.execute(ActorTask.java:120) [zeebe-scheduler-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.ActorThread.executeCurrentTask(ActorThread.java:130) [zeebe-scheduler-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.ActorThread.doWork(ActorThread.java:108) [zeebe-scheduler-8.4.0.jar:8.4.0]
2024-02-19 17:46:19 at io.camunda.zeebe.scheduler.ActorThread.run(ActorThread.java:227) [zeebe-scheduler-8.4.0.jar:8.4.0]

As the example implements the ServerInterceptor, I am confused about why this error occurs and what I can do to avoid it.

Best,
ciph

How are you implementing your custom interceptor. Based on the log, you are not extending the serverinterceptor.

“2024-02-19 17:46:19 java.util.concurrent.CompletionException: io.camunda.zeebe.gateway.interceptors.impl.InterceptorLoadException: Cannot load interceptor [logging-interceptor]: specified class does not implement ServerInterceptor”

Are you implementing all the methods provided by this interface?