# Keycloak 24 Official Example Rest Endpoints Not Working

**URL:** <https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855>\
**Category:** Extending the server\
**Created:** [November 21, 2024, 12:15pm UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855 "2024-11-21T12:15:53Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![halilbaydar](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/halilbaydar/32/12249_2.png) [@halilbaydar](https://forum.keycloak.org/u/halilbaydar)\
**Post date:** [November 21, 2024, 12:15pm UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/1 "2024-11-21T12:15:53Z")

</div>

[Keycloak Rest Example](https://github.com/keycloak/keycloak/blob/24.0.2/examples/providers/rest/README.md)

it is the official rest example.It is not working!

Note: Sorry, new users can upload only one image for each topic.

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/b/b08f508246d4cf33466282cf32b82aa8535d6535.jpeg)

I reviewed multiple times I tried everything like putting @Provider annotation or using @AutoService(RealmResourceProviderFactory.class). None of them is working.

{  
“error”: “Unable to find matching target resource method”,  
“error\_description”: “For more on this error consult the server log at the debug level.”  
}

I spent one week for this. Can you help me?

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [November 21, 2024, 1:52pm UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/2 "2024-11-21T13:52:37Z")

</div>

> [@halilbaydar](#):
>
> For more on this error consult the server log at the debug level.

Did you do this? Starting Keycloak with log level debug, then try again and see what errors are shown in the server log… What is shown there?

You are calling the endpoint with `/auth` in your context path… Have you configured this in the server explicitly? If not, try to call the endpoint without `/auth`. If it works and you have the URL from the docs, don’t complain, write an issue/pull request to improve the docs, help the community.

* * *

P.S.: Providing source code not through screen shots, but pasted here as text or linking some GitHub repo is easier to read for most people. Large screenshots only fit to large monitors, don’t expect everyone to have the same size as you. Formatting options here are pretty good.

---

<div class="post-metadata">

**Author:** ![halilbaydar](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/halilbaydar/32/12249_2.png) [@halilbaydar](https://forum.keycloak.org/u/halilbaydar)\
**Post date:** [November 21, 2024, 2:01pm UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/3 "2024-11-21T14:01:54Z")

</div>

I’ve already enabled debug level log but I cannot understand anything.

Keycloak throws  
`Error response 404: jakarta.ws.rs.NotFoundException: Unable to find matching target resource method`

2024-11-21 17:00:06,623 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (Timer-0) JtaTransactionWrapper end

2024-11-21 17:00:09,295 DEBUG [WebApplicationException] (vert.x-eventloop-thread-7) Restarting handler chain for exception exception: jakarta.ws.rs.NotFoundException: Unable to find matching target resource method

at org.jboss.resteasy.reactive.server.handlers.ClassRoutingHandler.throwNotFound(ClassRoutingHandler.java:233)

at org.jboss.resteasy.reactive.server.handlers.ClassRoutingHandler.handle(ClassRoutingHandler.java:102)

at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:123)

at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)

at org.jboss.resteasy.reactive.server.handlers.RestInitialHandler.beginProcessing(RestInitialHandler.java:48)

at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:23)

at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:10)

at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1285)

at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)

at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:137)

at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$1.handle(HttpServerCommonHandlers.java:62)

at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$1.handle(HttpServerCommonHandlers.java:40)

at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1285)

at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)

at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:137)

at io.quarkus.resteasy.reactive.server.runtime.ResteasyReactiveRecorder$13.handle(ResteasyReactiveRecorder.java:339)

at io.quarkus.resteasy.reactive.server.runtime.ResteasyReactiveRecorder$13.handle(ResteasyReactiveRecorder.java:332)

at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1285)

at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)

at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:137)

at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:68)

at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:37)

at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$2.handle(HttpServerCommonHandlers.java:86)

at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$2.handle(HttpServerCommonHandlers.java:69)

at io.quarkus.vertx.http.runtime.VertxHttpRecorder$1.handle(VertxHttpRecorder.java:147)

at io.quarkus.vertx.http.runtime.VertxHttpRecorder$1.handle(VertxHttpRecorder.java:123)

at io.vertx.core.impl.ContextImpl.emit(ContextImpl.java:328)

at io.vertx.core.impl.DuplicatedContext.emit(DuplicatedContext.java:166)

at io.vertx.core.http.impl.Http1xServerConnection.handleMessage(Http1xServerConnection.java:174)

at io.vertx.core.net.impl.ConnectionBase.read(ConnectionBase.java:159)

at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:153)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.vertx.core.http.impl.Http1xUpgradeToH2CHandler.channelRead(Http1xUpgradeToH2CHandler.java:124)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)

at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.vertx.core.http.impl.Http1xOrH2CHandler.end(Http1xOrH2CHandler.java:61)

at io.vertx.core.http.impl.Http1xOrH2CHandler.channelRead(Http1xOrH2CHandler.java:38)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)

at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)

at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)

at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

at java.base/java.lang.Thread.run(Thread.java:842)

2024-11-21 17:00:09,297 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (vert.x-eventloop-thread-7) new JtaTransactionWrapper

2024-11-21 17:00:09,297 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (vert.x-eventloop-thread-7) was existing? false

2024-11-21 17:00:09,297 DEBUG [org.keycloak.services.error.KeycloakErrorHandler] (vert.x-eventloop-thread-7) Error response 404: jakarta.ws.rs.NotFoundException: Unable to find matching target resource method

at org.jboss.resteasy.reactive.server.handlers.ClassRoutingHandler.throwNotFound(ClassRoutingHandler.java:233)

at org.jboss.resteasy.reactive.server.handlers.ClassRoutingHandler.handle(ClassRoutingHandler.java:102)

at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:123)

at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)

at org.jboss.resteasy.reactive.server.handlers.RestInitialHandler.beginProcessing(RestInitialHandler.java:48)

at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:23)

at org.jboss.resteasy.reactive.server.vertx.ResteasyReactiveVertxHandler.handle(ResteasyReactiveVertxHandler.java:10)

at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1285)

at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)

at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:137)

at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$1.handle(HttpServerCommonHandlers.java:62)

at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$1.handle(HttpServerCommonHandlers.java:40)

at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1285)

at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)

at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:137)

at io.quarkus.resteasy.reactive.server.runtime.ResteasyReactiveRecorder$13.handle(ResteasyReactiveRecorder.java:339)

at io.quarkus.resteasy.reactive.server.runtime.ResteasyReactiveRecorder$13.handle(ResteasyReactiveRecorder.java:332)

at io.vertx.ext.web.impl.RouteState.handleContext(RouteState.java:1285)

at io.vertx.ext.web.impl.RoutingContextImplBase.iterateNext(RoutingContextImplBase.java:177)

at io.vertx.ext.web.impl.RoutingContextImpl.next(RoutingContextImpl.java:137)

at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:68)

at io.vertx.ext.web.impl.RouterImpl.handle(RouterImpl.java:37)

at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$2.handle(HttpServerCommonHandlers.java:86)

at io.quarkus.vertx.http.runtime.options.HttpServerCommonHandlers$2.handle(HttpServerCommonHandlers.java:69)

at io.quarkus.vertx.http.runtime.VertxHttpRecorder$1.handle(VertxHttpRecorder.java:147)

at io.quarkus.vertx.http.runtime.VertxHttpRecorder$1.handle(VertxHttpRecorder.java:123)

at io.vertx.core.impl.ContextImpl.emit(ContextImpl.java:328)

at io.vertx.core.impl.DuplicatedContext.emit(DuplicatedContext.java:166)

at io.vertx.core.http.impl.Http1xServerConnection.handleMessage(Http1xServerConnection.java:174)

at io.vertx.core.net.impl.ConnectionBase.read(ConnectionBase.java:159)

at io.vertx.core.net.impl.VertxHandler.channelRead(VertxHandler.java:153)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.vertx.core.http.impl.Http1xUpgradeToH2CHandler.channelRead(Http1xUpgradeToH2CHandler.java:124)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)

at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.vertx.core.http.impl.Http1xOrH2CHandler.end(Http1xOrH2CHandler.java:61)

at io.vertx.core.http.impl.Http1xOrH2CHandler.channelRead(Http1xOrH2CHandler.java:38)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)

at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)

at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)

at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919)

at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166)

at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788)

at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)

at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)

at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)

at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)

at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)

at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

at java.base/java.lang.Thread.run(Thread.java:842)

2024-11-21 17:00:09,300 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (vert.x-eventloop-thread-7) JtaTransactionWrapper rollback

2024-11-21 17:00:09,300 DEBUG [org.keycloak.transaction.JtaTransactionWrapper] (vert.x-eventloop-thread-7) JtaTransactionWrapper end

---

<div class="post-metadata">

**Author:** ![halilbaydar](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/halilbaydar/32/12249_2.png) [@halilbaydar](https://forum.keycloak.org/u/halilbaydar)\
**Post date:** [November 21, 2024, 2:05pm UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/4 "2024-11-21T14:05:07Z")

</div>

When I try without `auth`

`http://localhost:8080/realms/master/hello`

response:  
{  
“error”: “HTTP 404 Not Found”,  
“error\_description”: “For more on this error consult the server log at the debug level.”  
}

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/0/0f6e71462654b4fc4fb23dc3e118f3918dc7f3db.png)

2024-11-21 17:04:05,586 DEBUG [WebApplicationException] (executor-thread-1) Restarting handler chain for exception exception: jakarta.ws.rs.NotFoundException: HTTP 404 Not Found  
at org.keycloak.services.resources.RealmsResource.resolveRealmExtension(RealmsResource.java:272)  
at org.keycloak.services.resources.RealmsResource$quarkusrestinvoker$resolveRealmExtension\_c7e400748748bf35309bc60d82a4789f2a0e2d02.invoke(Unknown Source)  
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)  
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)  
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)  
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)  
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)  
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)  
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)  
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)  
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)  
at java.base/java.lang.Thread.run(Thread.java:842)

2024-11-21 17:04:05,587 DEBUG [org.keycloak.services.error.KeycloakErrorHandler] (executor-thread-1) Error response 404: jakarta.ws.rs.NotFoundException: HTTP 404 Not Found  
at org.keycloak.services.resources.RealmsResource.resolveRealmExtension(RealmsResource.java:272)  
at org.keycloak.services.resources.RealmsResource$quarkusrestinvoker$resolveRealmExtension\_c7e400748748bf35309bc60d82a4789f2a0e2d02.invoke(Unknown Source)  
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)  
at io.quarkus.resteasy.reactive.server.runtime.QuarkusResteasyReactiveRequestContext.invokeHandler(QuarkusResteasyReactiveRequestContext.java:141)  
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:147)  
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$14.runWith(VertxCoreRecorder.java:582)  
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)  
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)  
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)  
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)  
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)  
at java.base/java.lang.Thread.run(Thread.java:842)

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [November 21, 2024, 3:45pm UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/6 "2024-11-21T15:45:30Z")

</div>

Your file in `META-INF/services` is named wrong.  
Rename it to reflect the full qualified classname of the `RestResourceProviderFactory`.

---

<div class="post-metadata">

**Author:** ![halilbaydar](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/halilbaydar/32/12249_2.png) [@halilbaydar](https://forum.keycloak.org/u/halilbaydar)\
**Post date:** [November 22, 2024, 7:31am UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/7 "2024-11-22T07:31:42Z")

</div>

Can you tell me where is the typo? It is not correct?

`org.keycloak.examples.rest.HelloResourceProviderFactory`

I checked the file name from the official example repo and it is different from the factory class name

`org.keycloak.services.resource.RealmResourceProviderFactory`

---

<div class="post-metadata">

**Author:** ![halilbaydar](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/halilbaydar/32/12249_2.png) [@halilbaydar](https://forum.keycloak.org/u/halilbaydar)\
**Post date:** [November 22, 2024, 7:32am UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/8 "2024-11-22T07:32:34Z")

</div>

I found a debug log

`2024-11-22 10:29:45,576 DEBUG [io.quarkus.arc.runtime.BeanContainerImpl] (main) No matching bean found for type class org.keycloak.examples.rest.HelloResourceProvider and qualifiers []. The bean might have been marked as unused and removed during build.`

What can be the reason behind of this?

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [November 22, 2024, 8:18am UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/9 "2024-11-22T08:18:24Z")

</div>

I can only repeat myself and the file name in the example is correct, you have to name it exactly to the same.  
The file **name** must be `org.keycloak.services.resource.RealmResourceProviderFactory`, the **content** of the file must be `org.keycloak.examples.rest.HelloResourceProviderFactory`.  
It uses the _Service Loader_ standard in Java.

---

<div class="post-metadata">

**Author:** ![halilbaydar](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/halilbaydar/32/12249_2.png) [@halilbaydar](https://forum.keycloak.org/u/halilbaydar)\
**Post date:** [November 22, 2024, 8:34am UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/10 "2024-11-22T08:34:40Z")

</div>

> [@dasniko](#):
>
> RealmResourceProviderFactory

Sorry, but not fixed ☹

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/3/3c4a1031067b7d8b3cdd1fc9775480fabbe10bb0.png)

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [November 22, 2024, 8:42am UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/11 "2024-11-22T08:42:16Z")

</div>

> [@dasniko](#):
>
> You are calling the endpoint with `/auth` in your context path… Have you configured this in the server explicitly? If not, try to call the endpoint without `/auth`. If it works and you have the URL from the docs, don’t complain, write an issue/pull request to improve the docs, help the community.

You never told us, if you have configured this context path or not, but you are still keeping it in your requests… 🤷‍♂️

---

<div class="post-metadata">

**Author:** ![halilbaydar](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/halilbaydar/32/12249_2.png) [@halilbaydar](https://forum.keycloak.org/u/halilbaydar)\
**Post date:** [November 22, 2024, 9:10am UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/12 "2024-11-22T09:10:52Z")

</div>

> [@dasniko](#):
>
> You are calling the endpoint with `/auth` in your context path… Have you configured this in the server explicitly?

SOLVED. THANK YOU SO MUCH.

---

<div class="post-metadata">

**Author:** ![halilbaydar](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/halilbaydar/32/12249_2.png) [@halilbaydar](https://forum.keycloak.org/u/halilbaydar)\
**Post date:** [November 22, 2024, 9:24am UTC](https://forum.keycloak.org/t/keycloak-24-official-example-rest-endpoints-not-working/28855/13 "2024-11-22T09:24:34Z")

</div>

There are two points that I missed.

1: Service file name format or logic is not the same with other providers’ service file name. It’s static and it must be `org.keycloak.services.resource.RealmResourceProviderFactory`

2: The original example sends request with `/auth` prefix but it doesn’t mention about the keycloak context. Without custom context there is no need to add `/auth` or any other prefix.

Thank you so much for your help.
