1

I have a small rest client project using microprofile 3.3 and i want to deploy it on a raw wildfly 21.0.1.FINAL using the standalone-microprofile.xml.

This project has activated security with jwt and calls another rest-service via @RegisterRestClient-Interface.

I have the problem that the authorization header is not transferred to the following intern rest-call.

In my research i found out that in DefaultClientHeadersFactoryImpl.config() an error occurs that the class ConfigProvider is not found. I thought that using the microprofile-dependency in pom and standalone-microprofile.xml in wildfly add all dependencies for microprofile automatically. Also when i add microprofile-config-api additionally and not provided i get this error.

Does anyone know this problem and how to fix it?

If you need additional information: Just ask ;-)

My only dependency in the pom.xml:

<dependencies>
    <dependency>
        <groupId>org.eclipse.microprofile</groupId>
        <artifactId>microprofile</artifactId>
        <version>3.3</version>
        <type>pom</type>
        <scope>provided</scope>
    </dependency>
</dependencies>

I am launching wildfly with following parameter:

--server-config=standalone-microprofile.xml

The projects are available at Github

Benjamin Schüller
  • 2,104
  • 1
  • 17
  • 29
  • Are you launching WildFly with the `standalone-microprofile.xml`? Or have you added the appropriate MicroProfile subsystems? – James R. Perkins Dec 02 '20 at 02:55
  • I am launching wildfly with following parameter: --server-config=standalone-microprofile.xml – Benjamin Schüller Dec 02 '20 at 08:43
  • Sorry you said that right in the question and I completely missed it :) Do you by chance have a reproducer? This seems like it could potentially be a bug. – James R. Perkins Dec 03 '20 at 00:51
  • I don't think microprofile-config is in `org.eclipse.microprofile:microprofile`, you may need to depend on `org.eclipse.microprofile.config:microprofile-config-api`. Also please add *exact* error message. – dualed Dec 03 '20 at 09:19
  • @dualed If you have a look in the maven repository, you see that microprofile-config-api is a dependency from microprofile. => https://mvnrepository.com/artifact/org.eclipse.microprofile/microprofile/3.3 – Benjamin Schüller Dec 03 '20 at 12:52
  • On server you do not see any exception. Just the AUTH-Header is missing after the call from one rest-service to another. I only saw an CNF-Exception in DefaultClientHeadersFactoryImpl.config() while debugging. – Benjamin Schüller Dec 03 '20 at 12:54
  • @JamesR.Perkins The test projects are here: https://github.com/bschueller/microprofile-demo-wildfly – Benjamin Schüller Dec 03 '20 at 13:05
  • Oof, apparently I was remembering that wrong... Well, I only used Quarkus with MicroProfile, this seems WildFly specific now... – dualed Dec 03 '20 at 13:16

0 Answers0