# org.jboss.resteasy.microprofile.config.ServletConfigSource not a subtype

**URL:** <https://forum.keycloak.org/t/org-jboss-resteasy-microprofile-config-servletconfigsource-not-a-subtype/28221>\
**Category:** Extending the server\
**Created:** [October 7, 2024, 8:14pm UTC](https://forum.keycloak.org/t/org-jboss-resteasy-microprofile-config-servletconfigsource-not-a-subtype/28221 "2024-10-07T20:14:17Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://forum.keycloak.org/u/eric)\
**Post date:** [October 7, 2024, 8:14pm UTC](https://forum.keycloak.org/t/org-jboss-resteasy-microprofile-config-servletconfigsource-not-a-subtype/28221/1 "2024-10-07T20:14:17Z")

</div>

I am getting the following error when starting keycloak version 25.0.0.  
ERROR: org.eclipse.microprofile.config.spi.ConfigSource: org.jboss.resteasy.microprofile.config.ServletConfigSource not a subtype

We upgraded from 12 to 25. However, our SPI was built against 10. After making several changes and building against 25, I am stuck with the above error. I fixed some other not a subtype errors by adding some more dependencies to the pom file after reading online. But, I can not find a solution for the above error. Below is what I currently have as dependencies. Can someone tell me what else I need to include or even how to begin to figure out what I might need to include?

```auto
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
      <version>3.4.3.Final</version>
    </dependency>
    <dependency>
      <groupId>org.jboss.resteasy</groupId>
      <artifactId>resteasy-client</artifactId>
      <version>6.2.10.Final</version>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-jackson</artifactId>
      <version>3.8.5</version>
    </dependency>
    <dependency>
      <groupId>jakarta.servlet</groupId>
      <artifactId>jakarta.servlet-api</artifactId>
      <version>6.1.0</version>
    </dependency>
    <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-server-spi</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-server-spi-private</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.keycloak</groupId>
      <artifactId>keycloak-services</artifactId>
      <scope>provided</scope>
    </dependency>

```

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://forum.keycloak.org/u/eric)\
**Post date:** [October 8, 2024, 8:00pm UTC](https://forum.keycloak.org/t/org-jboss-resteasy-microprofile-config-servletconfigsource-not-a-subtype/28221/2 "2024-10-08T20:00:29Z")

</div>

I added the following and that helped. I think. Now I get  
ERROR: io.smallrye.config.ConfigSourceFactory: io.smallrye.config.PropertiesLocationConfigSourceFactory not a subtype

```auto
    <dependency>
      <groupId>org.jboss.resteasy.microprofile</groupId>
      <artifactId>microprofile-config</artifactId>
      <version>2.1.5.Final</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.microprofile.config</groupId>
      <artifactId>microprofile-config-api</artifactId>
      <version>3.0.3</version>
      <scope>provided</scope>
    </dependency>

```

Is there an easy way to track down the dependencies and version that I need based on the error or something?

---

<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:** [October 8, 2024, 8:20pm UTC](https://forum.keycloak.org/t/org-jboss-resteasy-microprofile-config-servletconfigsource-not-a-subtype/28221/3 "2024-10-08T20:20:13Z")

</div>

Instead of adding more and more dependencies, perhaps a complete new rewrite of your extension based on current dependencies would be the better approach!?  
As you are comming from v10/12, this was a complete different environment than it is today…

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://forum.keycloak.org/u/eric)\
**Post date:** [October 8, 2024, 8:38pm UTC](https://forum.keycloak.org/t/org-jboss-resteasy-microprofile-config-servletconfigsource-not-a-subtype/28221/4 "2024-10-08T20:38:34Z")

</div>

I am starting to wonder about a complete rewrite. Although I am not sure time will allow it. And, the original developer is no longer with the company, so that doesn’t help either. I don’t mind including more dependencies if it will work.

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://forum.keycloak.org/u/eric)\
**Post date:** [October 9, 2024, 1:15pm UTC](https://forum.keycloak.org/t/org-jboss-resteasy-microprofile-config-servletconfigsource-not-a-subtype/28221/5 "2024-10-09T13:15:49Z")

</div>

I am now getting the following error after adding this.

```auto
    <dependency>
      <groupId>io.smallrye.config</groupId>
      <artifactId>smallrye-config</artifactId>
      <version>3.5.4</version>
      <scope>provided</scope>
    </dependency>

```

Caused by: io.smallrye.config.ConfigValidationException: Configuration validation failed:  
java.lang.IllegalArgumentException: SRCFG00013: No Converter registered for class io.quarkus.runtime.configuration.MemorySize  
at io.smallrye.config.ConfigMappingProvider.mapConfiguration(ConfigMappingProvider.java:75)  
at io.smallrye.config.SmallRyeConfig.(SmallRyeConfig.java:84)  
at io.smallrye.config.SmallRyeConfigBuilder.build(SmallRyeConfigBuilder.java:724)  
at io.quarkus.deployment.configuration.BuildTimeConfigurationReader.initConfiguration(BuildTimeConfigurationReader.java:415)  
at io.quarkus.deployment.ExtensionLoader.loadStepsFrom(ExtensionLoader.java:137)  
at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:107)  
at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment(AugmentActionImpl.java:330)  
at io.quarkus.runner.bootstrap.AugmentActionImpl.createProductionApplication(AugmentActionImpl.java:175)  
at io.quarkus.deployment.mutability.ReaugmentTask.main(ReaugmentTask.java:69)  
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)

---

<div class="post-metadata">

**Author:** ![eric](https://avatars.discourse-cdn.com/v4/letter/e/898d66/32.png) [@eric](https://forum.keycloak.org/u/eric)\
**Post date:** [October 9, 2024, 8:51pm UTC](https://forum.keycloak.org/t/org-jboss-resteasy-microprofile-config-servletconfigsource-not-a-subtype/28221/6 "2024-10-09T20:51:47Z")

</div>

I fixed the configuration validation failed error by adding the following dependencies.

```auto
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-core</artifactId>
      <version>3.8.5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-vertx-http</artifactId>
      <version>3.8.5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-jackson</artifactId>
      <version>3.8.5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.quarkus</groupId>
      <artifactId>quarkus-resteasy-common</artifactId>
      <version>3.8.5</version>
      <scope>provided</scope>
    </dependency>

```

And now my error is.  
Caused by: java.lang.LinkageError: loader constraint violation: loader io.quarkus.bootstrap.classloading.QuarkusClassLoader @6d0b5baf wants to load interface io.quarkus.arc.runtime.BeanContainer. A different interface with the same name was previously loaded by java.net.URLClassLoader @b83a9be. (io.quarkus.arc.runtime.BeanContainer is in unnamed module of loader java.net.URLClassLoader @b83a9be, parent loader ‘app’)

I am really starting to think I have went down the wrong path here. Looking at the current code. It seems to need jboss resteasy for HttpRequest and HttpResponse, jboss logging, fasterxml.jackson, and jarkarta.ws.rs. Should I just not be using these in the newer Keycloak, or have I really just messed up the dependencies.
